We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
>> var id = (x) => x, x = id(...[1,2,3]); typeof x; 'object'
it doesn't fail like it should.
The text was updated successfully, but these errors were encountered:
Could you explain for me how or why it should fail? One difference I see when executing with e.g. Chrome:
var id = (x) => x, x = id(...[1,2,3]); console.log(typeof x, x); number 1
Firefox:
njs:
interactive njs 0.5.3 >> var id = (x) => x, x = id(...[1,2,3]); console.log(typeof x, x); object [1,2,3] interactive njs 0.6.0 >> var id = (x) => x, x = id(...[1,2,3]); console.log(typeof x, x); object [1,2,3]
Edit: Maybe because spread is not supported at all?
interactive njs 0.6.0 >> [...[1,2,3]] [ ]
Sorry, something went wrong.
@277hz Hi! It should fail 'cause it's not supported #78 :)
@drsm See #78.
>> ((a, b, c, d) => console.log(a, b, c, d))(...[1, 3], ...[2, 4]); 1 3 2 4 >> ((a, b, c, d) => console.log(a, b, c, d))(...[1, 3], [2, 4]); 1 3 [2,4] undefined >> ((a, b, c, d) => console.log(a, b, c, d))(...[1, 3], [2], 4]); 1 3 [2] 4
3ebbfbc
No branches or pull requests
it doesn't fail like it should.
The text was updated successfully, but these errors were encountered: