What syntax is this statement for JavaScript?

what I saw on the Internet:

const randomStr = "hdjrwqpei";
console.log([...randomStr]);

Why is it possible to convert a string to an array after this processing?
output: ["hints," dudes, "jacks," rashes, "winters," Qstocks, "packs," eBay,"i"]

Dec.30,2021
The extension operator of

js (spread).


extension operator (Spread syntax)


is a new syntax for ES6. Please refer to Ruan Yifeng's "introduction to ECMAScript 6" http://es6.ruanyifeng.com/?se.

.
Menu