fix: Fix examples for Array#includes method (#16360)

This commit is contained in:
Aliou Diallo
2025-06-18 12:10:10 +02:00
committed by GitHub
parent 8e083b3c56
commit 16b0297f85

View File

@@ -241,8 +241,8 @@ export const arrayMethods: NativeDoc = {
name: 'includes', name: 'includes',
description: 'Returns <code>true</code> if the array contains the specified element', description: 'Returns <code>true</code> if the array contains the specified element',
examples: [ examples: [
{ example: "['Bob', 'Bill', 'Nat'].indexOf('Nat')", evaluated: 'true' }, { example: "['Bob', 'Bill', 'Nat'].includes('Nat')", evaluated: 'true' },
{ example: "['Bob', 'Bill', 'Nat'].indexOf('Nathan')", evaluated: 'false' }, { example: "['Bob', 'Bill', 'Nat'].includes('Nathan')", evaluated: 'false' },
], ],
docURL: docURL:
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes', 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes',