🏠 Games Tutorials Dev blog JS code golf Other projects

Hello World in ASCII-art

February 2014

A stackexchange challenge. Best JS solution: 117 bytes (to execute in a JS console):

for(i=s="";l=[43117609029,64070269789,46349920852,46890400349][i++];)for(j=0,s+="\n";c=l.toString(2)[j++];)s+=" #"[c]

Best ES6 solution (works on Firefox): 108 bytes:

[,0xa0a028045,0xeeae2bb5d,0xacaabaa54,0xaeae2ba5d].map(a=>a.toString(2).replace(/./g,b=>' #'[b])).join('\n')
link