es6 const code example
Example 1: js define constant by element id
const elem = document.getElementById('elementID');
Example 2: const js +=
const foo; // Errror as const cannot be kept un-initialized;
const foo = "foo";
console.log(foo); //Output: foo
foo += " bar"; //Error