Last active
February 27, 2018 04:41
-
-
Save jaamaalxyz/9b5dd35f33eb944e1454e8e912f78129 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
// const type variable declaration | |
const PI = 3.14; // Global value of pi | |
const TAX_RATE = 8.5; // maybe your tax rate 8.5% | |
const INTEREST_RATE = 12; // Bank interest rate is 12% | |
// output | |
console.log(PI); // 3.14 | |
console.log(TAX_RATE); // 8.5 | |
console.log(INTEREST_RATE); // 12 | |
// If we want to make change const type variable, we get TypeError | |
PI = 3.1416; // TypeError | |
// If we want to reassign any const type variable, we get SyntaxError | |
const INTEREST_RATE = 15; // SyntaxError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment