From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../global_objects/array/isarray/index.html | 154 +++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 files/tr/web/javascript/reference/global_objects/array/isarray/index.html (limited to 'files/tr/web/javascript/reference/global_objects/array/isarray') diff --git a/files/tr/web/javascript/reference/global_objects/array/isarray/index.html b/files/tr/web/javascript/reference/global_objects/array/isarray/index.html new file mode 100644 index 0000000000..aafa47718c --- /dev/null +++ b/files/tr/web/javascript/reference/global_objects/array/isarray/index.html @@ -0,0 +1,154 @@ +--- +title: Array.isArray() +slug: Web/JavaScript/Reference/Global_Objects/Array/isArray +tags: + - Dizi + - dizi kontrol +translation_of: Web/JavaScript/Reference/Global_Objects/Array/isArray +--- +
{{JSRef}}
+ +

Array.isArray() metodu değerin Array olup olmadığını kontrol eder. 

+ +

Söz dizimi

+ +
Array.isArray(obj)
+ +

Parametreler

+ +
+
obj
+
Kontrol edilecek nesne.
+
+ +

Açıklamalar

+ +

Nesne eğer {{jsxref("Array")}} ise true değilse false döndürür.

+ +

Daha fazla detay için makaleye göz atın:  “Determining with absolute accuracy whether or not a JavaScript object is an array” 

+ +

Örnekler

+ +
// Aşağıdaki tüm örnekler true döndürür
+Array.isArray([]);
+Array.isArray([1]);
+Array.isArray(new Array());
+// Az bilinen gerçek: Array.prototype bir dizinin kendisidir:
+Array.isArray(Array.prototype);
+
+// Aşağıdaki tüm örnekler false döndürür
+Array.isArray();
+Array.isArray({});
+Array.isArray(null);
+Array.isArray(undefined);
+Array.isArray(17);
+Array.isArray('Array');
+Array.isArray(true);
+Array.isArray(false);
+Array.isArray({ __proto__: Array.prototype });
+
+ +

Kod Parçası

+ +

Aşağıdaki kod, diğer kodlardan önce çalıştırılırsa; doğal olarak var olmaması durumunda Array.isArray() 'i oluşturacaktır.

+ +
if (!Array.isArray) {
+  Array.isArray = function(arg) {
+    return Object.prototype.toString.call(arg) === '[object Array]';
+  };
+}
+
+ +

Tanımlamalar

+ + + + + + + + + + + + + + + + + + + + + + + + +
TanımlamaDurumAçıklama
{{SpecName('ES5.1', '#sec-15.4.3.2', 'Array.isArray')}}{{Spec2('ES5.1')}}İlk tanım. JavaScript 1.8.5 sürümünde uygulamaya koyuldu.
{{SpecName('ES6', '#sec-array.isarray', 'Array.isArray')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-array.isarray', 'Array.isArray')}}{{Spec2('ESDraft')}} 
+ +

Tarayıcı uyumluluğu

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
ÖzellikChromeFirefox (Gecko)Internet ExplorerOperaSafari
Temel Destek{{CompatChrome("5")}}{{CompatGeckoDesktop("2.0")}}{{CompatIE("9")}}{{CompatOpera("10.5")}}{{CompatSafari("5")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ÖzellikAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
+ + + + + + + +
Temel Destek 
+
{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Ayrıca bakınız

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