js.l21 code example

Example: js.l21

//	let arr = new Array();
//	let arr = [];

//	Array Means that Array Store many values in Array variable,,.. not a single variable.

//	Array defines like as a function.


//store more variables in single variable.

EXAMPLE:
----------
//	let arr = new array("Apple", "Orange", "Plum");

//	let fruits = ["Apple", "Orange", "Plum"];

// console.log(arr);
// console.log(arr[1]);
// console.log(array.length);
// console.log(array.length-4);
// console.log(array[array.length-2]);

// const array = ['man', 'chain', 'mogli', 'majjor', 'mine', 'manner'];
// console.log(array);
// array[2] = 're-asign mogli';           // muted or reasign array
// console.log(array);

// // an Array carying other variable and carying in other array.
// const RR = [1, 2, 65, 54];
// const vari = 'mee'
// let array = ['man', 'manner', RR, vari, 100-50];
// console.log(array);

Tags:

Misc Example