1.

What is the result of the spread operator array shown below?

Answer»

[...'apple']

Output: ['a', 'p', 'p', 'l', 'e']

Explanation: A STRING is an iterable type, and in an ARRAY, the spread operator transfers each character of an iterable to one element. As a result, each character in a string becomes an Array element.



Discussion

No Comment Found