Hi Friends 👋,
Welcome To Infinitbility! ❤️
push() method it will add your passed parameter into an array.
push() to add new strings element.
Here, we will do
- Create a sample array variable with data.
push()method to add
1// Create a sample array variable with data.2let arr = ["infinitbility.com"];3console.log(arr)45// Use `push()` method to add6arr.push("aguidehub.com");7console.log(arr)89arr.push("sortoutcode.com");10console.log(arr)
I hope it helps you, All the best 👍.
Follow me on Twitter
Join our email list and get notified about new content
No worries, I respect your privacy and I will never abuse your email.
Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.