From c0ba0ec5e6e40212f45d7a656f25c9bf4ce6a462 Mon Sep 17 00:00:00 2001 From: satya Date: Tue, 19 Jul 2022 21:51:08 +0530 Subject: [PATCH] completed --- solutions/day-1/arrays-level-1.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 solutions/day-1/arrays-level-1.js diff --git a/solutions/day-1/arrays-level-1.js b/solutions/day-1/arrays-level-1.js new file mode 100644 index 0000000..ac71518 --- /dev/null +++ b/solutions/day-1/arrays-level-1.js @@ -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 + +