Created
December 27, 2018 02:40
-
-
Save sanzeeb3/a209ff93d61b60123763b671ab305755 to your computer and use it in GitHub Desktop.
Self Learning REACT JS
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
let a = 30; | |
console.log(a); | |
if( true ) { | |
let b = 40; | |
} | |
console.log(b); // Undefined. | |
const a = 45; | |
a = 30; // Error. | |
let WorkingFunction = (a = 10, b) => { | |
return a+b; | |
} | |
WorkingFunction( 20, 30 ); // Returns 50; | |
let NotWorkingFunction = ( a= 10, b ) => { | |
return a + b; | |
} | |
NotWorkingFunction( 20 ); // NAN, Since b is undefined. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment