loading...

re: A Comprehensive Guide to JavaScript - Part 4 - Arrays VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Yes! slice will create a copy of the existing array when assigned to a new value, the original array is not bothered. Example: var arr = ["school...
 

Great. So the conclusion is that if you dont specify the arguments (0,2), arr.slice() will reproduce the original array right?

Yes! Just arr.slice() will reproduce the original array.

code of conduct - report abuse