how to write variable js code example
Example 1: varianle in javascript
var one = 1; // variable stores numeric value
var two = 'two'; // variable stores string value
var three; // declared a variable without assigning a value
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