Login
Remember
Register
Ask a Question
What does this return? [...'Lydia'];
0
votes
asked
Mar 7, 2024
in
JavaScript
by
DavidAnderson
What does this return?
[
...
'Lydia'
]
;
A:
["L", "y", "d", "i", "a"]
B:
["Lydia"]
C:
[[], "Lydia"]
D:
[["L", "y", "d", "i", "a"]]
javascript-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Mar 7, 2024
by
DavidAnderson
Answer: A
A string is an iterable. The spread operator maps every character of an iterable to one element.
...