Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

javascript concat returns a new array

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

=> ["a", "b", "d"]
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.