“MDN comprend” Réponses codées

MDN.

const array1 = [1, 2, 3];
console.log(array1.includes(2));
// expected output: true
Dizzy Dog

MDN comprend

const sentence = 'The quick brown fox jumps over the lazy dog.';
const word = 'fox';
console.log(`The word "${word}" ${sentence.includes(word) ? 'is' : 'is not'} in the sentence`);
// expected output: "The word "fox" is in the sentence"
Dizzy Dog

Réponses similaires à “MDN comprend”

Questions similaires à “MDN comprend”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code