in a nested for loop how can i retrieve all the elements and collect them in a new array code example
Example: what is the modern syntax for iterating through array using for loop in javascript
let friends=["jony","tom","Tejas"];
friends.forEach(
function f(i){
console.log(i);
}
)