Last active
August 20, 2019 08:31
-
-
Save erdoganoksuz/c33d0afcc95bb080aeda8925ec37cbf8 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
const list = ["yey", "wuw"]; | |
list.valueOf = () => "JAVASCRIPT SO EASY!"; | |
if (Array.isArray(list)) console.log("IM AN ARRAY") | |
if (list.some(val => val === "yey")) console.log("YEY EXIST") | |
if(list == "JAVASCRIPT SO EASY!"){ | |
list.valueOf = () => 1; | |
console.log("IM ALSO STRING") | |
} | |
if(1 == list) console.log("IM ALSO NUMBER") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment