JavaScript Tips and code explained Use const and let
Use const and let Always declare variables with const or let, rather than var: // Use let let name = ‘John Doe’; // Use const const PI = 3.14; var, let, and const are used to declare variables. var is the oldest way to declare variables in JavaScript and has function scope. This means that … Read more