xxxxxxxxxx
let name = 'Shirshak'; //we can change later
const name2 = 'Kushal'; //we cannot change later
//if we use reference type like array
const names = ['Shirshak', 'Kushal', 'Keshav'];
// names[1] = 'Shailesh';
// names.push('Ganesh');
//in reference type if we don't change whole array
//we can change or push but in primitive type
// name3=[""]//this is not allow
let bank = 250;
let newBank = bank;
newBank = 500;
console.log(bank, newBank);
//In object and array
const newNames = names;
newNames.push('Ganesh');
console.log(names, newNames); //Here both array will have Ganesh
//newNames always gona reference names as it don't copy as it
//only take reference