Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some WATs to consider #1

Closed
getify opened this issue May 15, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@getify
Copy link

commented May 15, 2019

1 < 2 < 3;    // true
3 > 2 > 1;   // false
0 == -0;    // true
0 === -0;  // true
-0 < 0;      // false
0 > -0;      // false
0 <= -0;    // true
0 >= -0;    // true
Math.min(0,-0);    // -0
Math.max(0,-0);    // 0
!!true;        // true
!!false;       // false
!!(new Boolean(true));     // true
!!(new Boolean(false));     // true
String(null);     // "null"
String(undefined);   // "undefined"
String([null]);    // ""
String([undefined]);   // ""
Number(null);     // 0
Number(undefined);    // NaN
Number([null]);    // 0
Number([undefined]);   // 0
var a = Array( 3 );
a; // []
a[2];  // undefined
a.length; // 3
a.map( (v,idx)=>idx ); // [ ]

var b = Array.apply( null, Array(3) );
b; // [undefined,undefined,undefined]
b[2];   // undefined
b.length; // 3
b.map( (v,idx)=>idx ); // [0,1,2]
@pixari

This comment has been minimized.

Copy link
Owner

commented May 15, 2019

Thank you very much, @getify!
I'll definitely add them to the list.

@pixari pixari closed this in 53ff05b May 16, 2019

@pixari

This comment has been minimized.

Copy link
Owner

commented May 16, 2019

All WATs have been implemented.
The "explanations" are of course still missing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.