how to push array values in loop using javascript code example
Example: how to insert data in array via for loop js
function add(new_element){
let arr = [1,2,3,4,5];
for(let i=0;i<arr.length;i++)
{
arr.push(new_element);
}
return arr;
}
console.log(add("a"));