Last active
December 24, 2018 12:37
-
-
Save h3nr1ke/6b36deef368a157abdfdff60fe5d1e88 to your computer and use it in GitHub Desktop.
var example ECMA6
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
/** | |
* | |
*/ | |
_myVar = "Banana"; // using a var before its is declared | |
console.log(_myVar); | |
var _myFunction = function(){ | |
_myVar = "Apple"; // using before the declaration | |
console.log("_myVar -> " + _myVar); | |
}; | |
_myFunction(); // calling the variable before the declaration | |
var _myVar; | |
console.log(_myVar); | |
//END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment