Answers for "mdn includes"

0

mdn includes

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"
Posted by: Guest on October-09-2021
0

mdn .includes

const array1 = [1, 2, 3];
console.log(array1.includes(2));
// expected output: true
Posted by: Guest on October-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language