Created
January 18, 2018 11:09
-
-
Save tejuafonja/eb280f3fbd8080e6dd3db20bc98cba9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// is a==1&&a==2&&a==3 = true? | |
const a = { | |
currentVal: 0, | |
valueOf: function() { | |
return this.currentVal += 1; | |
} | |
} | |
if (a==1&&a==2&&a==3) { | |
alert("Test Passed! You're hired") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uniqueArray = (arr) => [...new Set(arr)]; | |
uniqueArray([1,2,3,4,5,1,2,6,7,2,8,9,4,10]) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment