The Array from() static method creates a new, shallow-copied array from an iterable or array-like object.

    
    const city = Array.from('Detroit');

    console.log(city);
    // ["D", "e", "t", "r", "o", "i", "t"]


    // another example
    const add = Array.from([1, 2, 3], (x) => x + x);

    console.log(add);
    // [2, 4, 6]