“Javascript Spread Syntaxe” Respostas de código

Operador de propagação de JavaScript

var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99)
// added extra new elements before and after the spread operator
//expected output: 88 2 4 6 8 10 99
Ariful Islam Adil(Code Lover)

Operador de propagação de JavaScript

var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99)
//expected output: 88 2 4 6 8 10 99
Ariful Islam Adil(Code Lover)

Operador de propagação de JavaScript

var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99) 
// added extra new elements before and after the spread operator
//expected output: 88 2 4 6 8 10 99
Ariful Islam Adil(Code Lover)

Javascript Spread Syntaxe

let arr1 = ['one', 'two'];
let arr2 = [...arr1, 'three', 'four', 'five'];
console.log(arr2); // ["one", "two", "three", "four", "five"]
SAMER SAEID

Operador de propagação de JavaScript

const arrValue = ['My', 'name', 'is', 'Jack'];

console.log(arrValue);   // ["My", "name", "is", "Jack"]
console.log(...arrValue); // My name is Jack
SAMER SAEID

Respostas semelhantes a “Javascript Spread Syntaxe”

Perguntas semelhantes a “Javascript Spread Syntaxe”

Mais respostas relacionadas para “Javascript Spread Syntaxe” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código