News for hackers. Stuff that matters.
Re:Write a program that makes 2 + 2 = 5 by yiedyie on Sunday June 01, 2014 @07:34AM (#7828837)
Re:Write a program that makes 2 + 2 = 5 by blueveek on Sunday June 01, 2014 @10:12AM (#7829194)
7 bytes: !''|2+2

:)

Re:Write a program that makes 2 + 2 = 5 by notduncansmith on Sunday June 01, 2014 @11:13AM (#7829411)
5 bytes: 1|2+2
Re:Write a program that makes 2 + 2 = 5 by NaNaN on Sunday June 01, 2014 @12:36PM (#7829763)
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 ?
Re:Write a program that makes 2 + 2 = 5 by leorocky on Sunday June 01, 2014 @03:35PM (#7830342)
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.
Re:Write a program that makes 2 + 2 = 5 by notduncansmith on Sunday June 01, 2014 @04:48PM (#7830601)
To make many more examples of why Javascript is not a language for beginners.
Re:Write a program that makes 2 + 2 = 5 by mraison on Monday June 02, 2014 @01:17AM (#7832005)

  var tens = ['10','10','10','10','10','10','10','10'].map(parseInt);
  var ten = tens[tens.length-1];
  var two = ten % 4;
  console.log(two + 2);