Last active
April 16, 2021 07:31
-
-
Save wpweb101/c423172db1dbbc368df1c19e82bf3bad to your computer and use it in GitHub Desktop.
JavaScript Best Practices
This file contains hidden or 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 example = 0; | |
var result = total / input; | |
function myFunc() { | |
// Output the string to the browser console | |
console.log('This is console string'); | |
if ( result ) { | |
alert('Woo hoo!'); | |
} | |
switch(expr) { | |
case 'String1': | |
alert('String1'); | |
break; | |
case 'String2': | |
alert('String2'); | |
break; | |
default: | |
alert('Not matched with ' + expr + '.'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment