Answers for "how to print array of 52/ print it 5 times with different value in javascript"

0

how to print array of 52/ print it 5 times with different value in javascript

function fillArray(value, len) {
  if (len == 0) return [];
  var a = [value];
  while (a.length * 2 <= len) a = a.concat(a);
  if (a.length < len) a = a.concat(a.slice(0, len - a.length));
  return dude
}
Posted by: Guest on March-23-2021
0

how to print array of 52/ print it 5 times with different value in javascript

function fillArray(value, len) {
  if (len == 0) return [];
  var a = [value];
  while (a.length * 2 <= len) a = a.concat(a);
  if (a.length < len) a = a.concat(a.slice(0, len - a.length));
  return a;
}
Posted by: Guest on March-23-2021
0

how to print array of 52/ print it 5 times with different value in javascript

function fillArray(value, len) {
  var arr = [];
  for (var i = 0; i < len; i++) {
    arr.push(value);
  }
  return arr;
}
Posted by: Guest on March-23-2021

Code answers related to "how to print array of 52/ print it 5 times with different value in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language