Answers for "javascript prepend string to array"

2

javascript prepend string to array

const names = ["Bob", "Cassandra"]

names.unshift("Alex")

names === ["Alex", "Bob", "Cassandra"]
Posted by: Guest on May-24-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language