August 28 Codewar

·

1 min read

I'm slowly getting back into the groove of things. I will say, I got a little too comfortable not pushing myself as much these past few weeks. It's hard to get out of that rut but "we go get!"

I have been doing my codewars daily which has helped me not feel totally worthless. I have been getting some on my first try which has been a huge win! Here is tonight's codewar. I'm also a 6kyu level now!

Title: Add a new item to the list

At first, I wanted to do .push but it's supposed to create a new list with the added item. I then remembered I saved a graphic that has been so incredibly helpful. I saw that .push does not create a new one all it does is edits the existing list.

arrays javascript.jpeg

so this was my solution:

function addExtra( listOfNumbers ){
    let newList = listOfNumbers.concat(6)
    return newList
}

I passed it and it felt great! What accomplishment did you have today? Let me know and let's celebrate together! <3