May 17 Codewar

·

1 min read

This codewar I saw and I kinda knew what it needed from me. I did my googling and found a few methods to work with it but in the end I was not able to finish it after 20min of going around it. I saw other solutions using the .reduce method and I honestly forgot all about that.

my attempt:

function arrayPlusArray(arr1, arr2) {
    const newarray = arr1.concat(arr2);
     //console.log(newarray)<<<< this worked
     return newarray.forEach(e => e + e)
     //trying to do a forEach of the new array and add them together but I think I went wrong making them into a string...?

Like I said I need to review more of the methods and get comfortable using them all.