Created
October 20, 2016 02:10
-
-
Save shrynx/8b0b4d89d737738117cd038515dce66d 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
// declaring an independent variable | |
let a = 50 | |
// declaring a mathematical constraint between the variable a and b | |
let b = a + 100 | |
// variable b is now holding value 150 | |
console.log(b) // 150 | |
// manipulating value of variable a | |
a = 100 | |
// variable b is still holding value 150 | |
console.log(b) // 150 | |
// unless we reassign the constraint between variable a and b, | |
// we can't have the contraint hold true. | |
b = a + 100 | |
// variable b is now holding value 200 | |
console.log(b) // 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment