Understanding Arrays in JavaScript for Beginners

javascript dev.to

Today, we’re going to learn why arrays are needed, what arrays are, and how to loop through them. So, let’s get started with why arrays came into JavaScript in the first place. Imagine you have to store marks of some students in your batch. Imagine arrays didn’t exist, how would you store multiple marks? Probably like this:- let mark1 = 87 let mark2 = 69 let mark3 = 92 . . . let markn = 56 These codes already seem full of verbosity. Now, imagine that you have 100 or more students. Wha

Read Full Tutorial open_in_new
arrow_back Back to Tutorials