We're a place where coders share, stay up-to-date and grow their careers.
A string is an array by default so you also could unshift all elements in an empty array and then join. Right?
I thought a string was a string by default. If you unshift() a string, would that throw an error?
I’m not by a computer right now to try it out lol
A string is an array by default so you also could unshift all elements in an empty array and then join. Right?
I thought a string was a string by default. If you unshift() a string, would that throw an error?
I’m not by a computer right now to try it out lol