allows us to easily assign the values of arrays to new variables:
let    [executable,    absPath,    target,    ...message]    = process.argv;
the third argument is assigned to the target variable:
node    script.js    /some/file/path
//the    final    argument ...message collapses all remaining destructured arguments into a single array

node    script.js /some/file/path    This    is    a    really    great    file!

results matching ""

    No results matching ""