You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Veuillez noter que `indexOf` utilise l'égalité stricte `===` pour la comparaison. Donc, si nous cherchons "faux", il trouve exactement "faux" et non le zéro.
257
257
258
-
<<<<<<< HEAD
259
-
Si nous voulons vérifier si `item` existe dans le tableau et n'avons pas besoin de l'index exact, alors `arr.includes` est préféré.
260
-
=======
261
-
If we want to check if `item` exists in the array, and don't need the index, then `arr.includes` is preferred.
262
-
>>>>>>> 285083fc71ee3a7cf55fd8acac9c91ac6f62105c
258
+
Si nous voulons vérifier si `item` existe dans le tableau et n'avons pas besoin de l'index, alors `arr.includes` est préféré.
263
259
264
260
La méthode [arr.lastIndexOf](mdn:js/Array/lastIndexOf) est la même que `indexOf`, mais recherche de droite à gauche.
0 commit comments