Skip to main content
added 70 characters in body
Source Link
NinjaBearMonkey
  • 10.4k
  • 3
  • 37
  • 66

JavaScript ES6, 6563 65 bytes

alert([...[for(c of prompt()].map(e=>e)c.charCodeAt().toString(2))].join(' '))

This is rather long, thanks to JavaScript's long function names. The Stack Snippet below is the rough ES5 equivalent, so it can be run in any browser. Thanks to edc65 for the golfing improvements.

alert(prompt().split('').map(function(e){return e.charCodeAt().toString(2)}).join(' '))

JavaScript ES6, 65 bytes

alert([...prompt()].map(e=>e.charCodeAt().toString(2)).join(' '))

This is rather long, thanks to JavaScript's long function names. The Stack Snippet below is the ES5 equivalent, so it can be run in any browser.

alert(prompt().split('').map(function(e){return e.charCodeAt().toString(2)}).join(' '))

JavaScript ES6, 63 65 bytes

alert([for(c of prompt())c.charCodeAt().toString(2)].join(' '))

This is rather long, thanks to JavaScript's long function names. The Stack Snippet below is the rough ES5 equivalent, so it can be run in any browser. Thanks to edc65 for the golfing improvements.

alert(prompt().split('').map(function(e){return e.charCodeAt().toString(2)}).join(' '))

Source Link
NinjaBearMonkey
  • 10.4k
  • 3
  • 37
  • 66

JavaScript ES6, 65 bytes

alert([...prompt()].map(e=>e.charCodeAt().toString(2)).join(' '))

This is rather long, thanks to JavaScript's long function names. The Stack Snippet below is the ES5 equivalent, so it can be run in any browser.

alert(prompt().split('').map(function(e){return e.charCodeAt().toString(2)}).join(' '))