Day 41: Functional Programming with splice, concat, and push
#100DaysOfCode Challenge

Search for a command to run...
#100DaysOfCode Challenge

No comments yet. Be the first to comment.
How Perseverance Led Me to Data Analytics

An SQL cheat sheet for beginners

My top learning resources and why I like them

A how-to- guide with code snippets and a live demo

My Top 7 Git Commands and How I Use Them

I completed a few more challenges on freeCodeCamp's JavaScript Algorithms and Data Structures course. I'm currently 58% done with the Functional Programming section.
splice method is used to remove elements from an array. It takes two arguments: the first is the index of where to start removing items and the second is the number of items to remove (if the second isn't provided, then default is to remove items to the end). NOTE: splice mutates the original arrayconcat method is used to join items end to end. For arrays, it will not mutate the original arrays but return a new array with the combined items.concat vs. push: concat does not mutate the original array while push does. This means if we want to add elements to an array without mutating it concat is a better choiceI only made it a through a few challenges today, but I'm happy I made a little bit of progress especially considering it was my first day back at work after being sick. Today's challenges weren't too difficult. I had seen some of these methods in previous challenges, but in a different context. I'm enjoying being able to see the different use cases - I think it's helping me gain a better understanding of them.
https://www.freecodecamp.org/ananfito
You can read my full journal for #100DaysOfCode on GitHub