InterviewSolution
| 1. |
How do you use the spread Operator & Spread operators? |
|
Answer» Using the REST operator we can CALL a function using any number of arguments and can be accessed as an ARRAY. It allows the destruction of an array of objects. Example of Rest operator in JavaScript function SUM(...theArgs) {
Speare operator is just the reverse of rest OPERATORS and allows to expand an iterable such as an array expression can be expanded using by dividing the array into individual elements. For example let array 1 = [3,4]; |
|