loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let number = 1;

// 500 lines later

// let with same name redeclared is an error
let number = 2;


let echoer = function(message) {
  // Reusing function argument name as let is an error
  let message = "Local message"; //Duplicate declaration "message"
  console.log(message);
  return message;
}

echoer("Hello there!");
Native Browser JavaScript