Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
yiedyie
· 12y ago · 0 comments
JavaScript ;)
http://codegolf.stackexchange.com/a/29944/12328
Comments
[–]
blueveek
12y ago
7 bytes: !''|2+2
:)
[–]
notduncansmith
12y ago
5 bytes: 1|2+2
[–]
NaNaN
12y ago
I think all these bytes are not creative. !![]+2+2 ? !''|2+2 ? 1|2+2 ? Why the use of new operators? Why not just write 1+2+2 ?
[–]
leorocky
12y ago
Well if you made a general add function that always performed an or operation on the least significant bit, it would be pretty interesting. You'd always flip odd and even in any addition.
[–]
notduncansmith
12y ago
To make many more examples of why Javascript is not a language for beginners.