Today I Learned

hashrocket A Hashrocket project

javascript concat returns a new array

const letters = ["a", "b", "d"];
console.log(letters.slice(0, -1).concat("c"));
=> [ "a", "b", "c" ]

console.log(letters)
=> ["a", "b", "d"]
See More #javascript TILs
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.