Some minor problems in ES6

1. Why did this arr become an array? What exactly happened to this . inside the function parameters?

function sort(...arr) {
                console.log(arr);
            }
            sort(3, 1, 5)
Mar.30,2021

http://es6.ruanyifeng.com/-sharpdo.


you can understand that arguments, uses your passed parameters as array elements for indefinite parameter functions

.
Menu