Convert Binary String Into Array In Javascript Functions And Events