![]() You may refer to the MDN documentation for more info about Spread Syntax. We can solve this using the Spread Syntax as follows. I can use this Spread Syntax to solve this: var arr1 = Īnother main use of Spread Syntax is while copying an array: var arr = I want this to be in a single array like. Let's have an example for this: var arr1 = Spread Syntax:ĭefinition: Allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |