Answers for "how to print list in javascript"

1

how to print a array js

var array = [1,2,3]

for(var i = 0; i < array.length ; i++){
    console.log(array[i])
}
Posted by: Guest on June-05-2020
0

how to print an array in javascript

var arr = ["Apples", "Lemons", "Mangoes"]


console.log(arr)


console.log("https://discord.gg/5yjWgMS")
Posted by: Guest on June-15-2020
0

how to print a list in javascript

var array = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
for (var i = 0; i < array.length; i++) {
  var str = '';
  for (var j = 0; j <= i; j++) {
    if (array[j] == 'E') str += '3';
    else str += array[j];
  }
  document.querySelector('span').innerHTML = document.querySelector('span').innerHTML + str + '<br />';
}
Posted by: Guest on August-01-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language