vars names js code example
Example 1: javascript variable
var user_name = prompt("Please enter your name:", "Type here");
alert("Hello " + user_name);
Example 2: js variables
// let & var are both editable variables:
var cow = 'moo';
let pig = 'oink';
cow = 10;
pig = 10;
// const is a permanent variable; you cannot change it.
const uncuttableGrass = '\/\/';
uncuttableGrass = '___';
// above throws an error