hey guys..What's the difference between push and concat in javascript?
is there any difference in performance?
hey guys..What's the difference between push and concat in javascript?
is there any difference in performance?
hello,
yes, the difference is:
The push() method adds new elements to the end of an array, and returns the new length.
Note: This method changes the length of an array!
The concat() method is used to join two or more arrays.
This method does not change the existing arrays, it only returns a copy of the joined arrays.
this web can help you also: http://www.w3schools.com/
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.