3
Name:
Anonymous
2012-02-21 15:28
JavaScript
'' == '0' //false
0 == '' //true
0 == '0' //true
false == 'false' //false
false == '0' //true
false == undefined //false
false == null //false
null == undefined //true
" \t\r\n" == 0 // true
Math.min() < Math.max(); // false
",,," == Array((null,'cool',false,NaN,4)); // true
new Array([],null,undefined,null) == ",,,"; // true
Math.max(); // -Infinity
Math.min(); // Infinity
var foo = [0];
foo == foo // true
foo == !foo // true
function toInt(number) {return number && + number | 0 || 0;}
toInt("1"); // 1
toInt("1.2"); // 1
toInt("-1.2"); // -1
toInt(1.2); // 1
toInt(0); // 0
toInt("0"); // 0
toInt(Number.NaN); // 0
toInt(1/0); // 0
[] + [] // "" (array plus array equals empty string)
[] + {} // [object Object]
{} + [] // 0
{} + {} // NaN
"S" - 1 // NaN
4
Name:
Anonymous
2012-02-21 15:41
Buddy, that entire wall of shit makes sense if you understand the language. If you need exactitude, ===, problem solved.
And you'd have to be a moron to do a naive comparison on array or object datatypes and expect it to magically give you back what you "really want".
6
Name:
Anonymous
2012-02-21 16:15
>>3
the future of programming
! embrace the web
!
7
Name:
Anonymous
2012-02-21 16:27
>>3
How could you forget that NaN is
not equal to itself ?
9
Name:
Anonymous
2012-02-21 16:42
>>8
[123][0] == 123[0] //false
10
Name:
Anonymous
2012-02-21 16:49
how bout this one
var a = [0];
a == a; // true
a == !a; // true
11
Name:
Anonymous
2012-02-21 16:58
>>3-10
Of course JavaScript is shit! It was standardized by ECMA. This is the same organization that put a 1900 leap year bug and
wdAutospaceLikeWW7 into an international standard (ECMA-376). This is the same organization that standardized the obsolete 16-bit Windows API (ECMA-234).
12
Name:
Anonymous
2012-02-21 17:06
13
Name:
Anonymous
2012-02-21 17:30
>>8-12
you're all just jelly your silly little toy languages arent in the top 10 on tiobe
14
Name:
Anonymous
2012-02-21 17:40
>>13
If I wanted to give a shit about TIOBE, I wouldn't not be a NEET at not.
17
Name:
Anonymous
2012-02-21 17:49
>>15
This won't load for me, but I can already tell it's a copy of one of O'Reilly's JavaScript books next to O'Reilly's
JavaScript: The Good Parts . This is very hilarious and witty and not missing the point at all, so let's just compare the width of each book like inane human beings incapable of critical thinking.
18
Name:
Anonymous
2012-02-21 18:52
>>17
it's funny because javascript copies shit from other languages and manages to introduce stupid limitations into them
20
Name:
Anonymous
2012-02-22 11:31
>>11
the ECMA must be the actors then!
22
Name:
Anonymous
2012-03-12 6:09
I want dubs in
Javascript