Respuestas Ejercicio 41 (JS Julio)

Comparte tu respuesta del ejercicio 41.

let valores = arr.forEach((element) => {
console.log(`${element}`)
})

console.log(valores)
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach(ar => {
  console.log(ar);
});
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34];
arr.forEach(el=>{
  console.log(el)
})
arr.forEach(elemento => console.log(`${elemento}`));

Buena noche:

const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]
const nuevo = arr.forEach(elem => console.log(elem))

const arr = [45, “Hola”, 82, 2, 67, true, “Juan”, 12.34]

arr.forEach(ar => {
console.log(ar);
});

Mi respuesta:

const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34];
arr.forEach(item =>{
  console.log(item);
})
arr.forEach(elem => console.log(elem))
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]
arr.forEach(function(ele){
    console.log(ele);
  }
)
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach(element => console.log(element))

Cordial saludo, mi código:

arr.forEach(element => console.log(element))

Esta es mi solución:

const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach((e)=>console.log(e))
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach(elemento => console.log(elemento));

Buenas noches, esta es mi respuesta:

const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34];
arr.forEach( item => console.log(item));
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach(function (elem){
  console.log(elem)
})
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

arr.forEach(element => console.log(element))

Mi respuesta:

const ej = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]

ej.forEach(aj => {
  console.log(aj);
});
const arr = [45, "Hola", 82, 2, 67, true, "Juan", 12.34]
function mostrarValor(valor){
  console.log(valor)
}
arr.forEach(mostrarValor)
1 me gusta
const array= [45, "Hola", 82, 2, 67, true, "Juan", 12.34]
function mostrar(valor){
  console.log(valor)
}
array.forEach(mostrar)