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
alert("Hello, world!"); |
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
if (someVar > otherVar) { | |
booleanVar = true; | |
} else { | |
booleanVar = false; | |
} |
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
someVar > otherVar ? booleanVar = true : booleanVar = false; |
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
var mySecondVar = (myFirstVar) ? myFirstVar : myThirdVar; |
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
if (someVar > 10) { | |
otherVar = true; | |
} |
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
someVar > 10 && (otherVar = true); |
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
parseInt("10"); | |
>> 10 | |
parseInt("010"); | |
>> 8 | |
parseInt("010", 10); | |
>> 10 | |
parseInt("10.9", 10); |
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
"10.5"*1; | |
>> 10.5 | |
"010.5"*1; | |
>> 10.5 | |
"s10.5"*1; | |
>> NaN | |
"10.5s"*1; |
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
parseFloat("10.5"); | |
>> 10.5 | |
parseFloat("s10.5"); | |
>> NaN | |
parseFloat("10.5s"); | |
>> 10.5 | |
parseFloat("10.5 5.10"); |
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
if(someVar == undefined) { | |
// this code should execute if someVar is undefined, but it doesn't | |
} |
OlderNewer