How to declare a variable and assign it with an Array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to declare a variable and assign it with an Array

16th Jul 2020, 4:25 PM
p o e t i c e n t h u s i a s t i c
p o e t i c e n t h u s i a s t i c - avatar
3 Answers
+ 2
let arr; arr =[1, 2, 3]
16th Jul 2020, 4:26 PM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 3
p o e t i c e n t h u s i a s t i c Have a look to my code carefully You will get it. However 🇮🇳Vivek🇮🇳 has answered absolutely right but it's the another way you can do it . So watch it and understand what I did. I hope it will help you. Thank you. https://code.sololearn.com/WT8PHQLqr3N3/?ref=app
16th Jul 2020, 4:33 PM
Akshay Panwar
Akshay Panwar - avatar
+ 2
let arr = [];
16th Jul 2020, 4:44 PM
ODLNT
ODLNT - avatar