Arrays


#1

var data =[“naruto” ,“kakashi” ,3 ,5];
console.log(data);
why does this code print the output in square brackets.
is there any way to print only the actual data within the array like c/c++


#2

you could use a for loop to print each element of the array


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.