From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../global_objects/array/includes/index.html | 169 --------------------- 1 file changed, 169 deletions(-) delete mode 100644 files/he/web/javascript/reference/global_objects/array/includes/index.html (limited to 'files/he/web/javascript/reference/global_objects/array/includes/index.html') diff --git a/files/he/web/javascript/reference/global_objects/array/includes/index.html b/files/he/web/javascript/reference/global_objects/array/includes/index.html deleted file mode 100644 index 369e5ad018..0000000000 --- a/files/he/web/javascript/reference/global_objects/array/includes/index.html +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Array.prototype.includes() -slug: Web/JavaScript/Reference/Global_Objects/Array/includes -tags: - - ג'אווה סקריפט - - מערך - - פוליפיל - - פרוטוטייפ -translation_of: Web/JavaScript/Reference/Global_Objects/Array/includes ---- -
{{JSRef}}
- -
שיטת includes() קובעת אם מערך מכיל אלמנט מסויים, מחזיר true או false בהתאם.
- -
 
- -

תחביר

- -
var boolean = array.includes(searchElement[, fromIndex])
- -

פרמטרים

- -
-
searchElement
-
האלמנט אותו מחפשים
-
fromIndex
-
אופציונלי. המיקום במערך בו להתחיל את החיפוש אחר searchElement. ערך שלילי יתחיל את החיפוש מהערך האחרון (array.length) + fromIndex בסדר עולה. ברירת מחדל 0.
-
- -

ערך מוחזר (Return)

- -

{{jsxref("Boolean")}}.

- -

דוגמאות

- -
[1, 2, 3].includes(2);     // true
-[1, 2, 3].includes(4);     // false
-[1, 2, 3].includes(3, 3);  // false
-[1, 2, 3].includes(3, -1); // true
-[1, 2, NaN].includes(NaN); // true
-
- -

פוליפיל - Polyfill

- -
if (!Array.prototype.includes) {
-  Array.prototype.includes = function(searchElement /*, fromIndex*/) {
-    'use strict';
-    if (this == null) {
-      throw new TypeError('Array.prototype.includes called on null or undefined');
-    }
-
-    var O = Object(this);
-    var len = parseInt(O.length, 10) || 0;
-    if (len === 0) {
-      return false;
-    }
-    var n = parseInt(arguments[1], 10) || 0;
-    var k;
-    if (n >= 0) {
-      k = n;
-    } else {
-      k = len + n;
-      if (k < 0) {k = 0;}
-    }
-    var currentElement;
-    while (k < len) {
-      currentElement = O[k];
-      if (searchElement === currentElement ||
-         (searchElement !== searchElement && currentElement !== currentElement)) { // NaN !== NaN
-        return true;
-      }
-      k++;
-    }
-    return false;
-  };
-}
-
- -

מפרט

- - - - - - - - - - - - - - - - - - - -
מפרטסטטוסהערה
{{SpecName('ES7', '#sec-array.prototype.includes', 'Array.prototype.includes')}}{{Spec2('ES7')}}הגדרה ראשונית
{{SpecName('ESDraft', '#sec-array.prototype.includes', 'Array.prototype.includes')}}{{Spec2('ESDraft')}} 
- -

תאימות דפדפנים

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
מאפייןChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
תמיכה בסיסית -

{{CompatChrome(47)}}

-
43{{CompatNo}}14279+349
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
מאפייןAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
תמיכה בסיסית{{CompatNo}} -

{{CompatChrome(47)}}

-
43{{CompatNo}}349 -

{{CompatChrome(47)}}

-
-
- -

ראה עוד

- - -- cgit v1.2.3-54-g00ecf