parent
0a978254c0
commit
c0ba0ec5e6
@ -0,0 +1,16 @@
|
|||||||
|
// 1.question
|
||||||
|
const arr = [];
|
||||||
|
// 2.question
|
||||||
|
const num = [1, 2, 3, 4, 5];
|
||||||
|
// 3.question
|
||||||
|
const len = num.length;
|
||||||
|
// 4.question
|
||||||
|
const firstItem = num[0];
|
||||||
|
const middleItem = num[(len - 1) / 2];
|
||||||
|
const lastItem = num[len - 1];
|
||||||
|
// 5.question
|
||||||
|
const mixedDataTypes = [1, 'satya', 20, false, null,undefined];
|
||||||
|
const lengthMixed = mixedDataTypes.length;
|
||||||
|
// 6.question
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue