0
Can anyone help me with this JavaScript Code?
const fruits=['apple','orange','graphs','cucumber',10,true]; console.log(Array.isArray('apple')); //Please explain me what this Array methods does //Array.isArray
6 Answers
+ 4
From https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/array/isarray
"The Array.isArray() method determines whether the passed value is an Array."
The method returms boolean true when the given argument was an array.
+ 4
Visph,
Didn't see you when I wrote LOL đ
+ 1
this (static) method check if the type of the argument is a valid array, in wich case it return true ^^
+ 1
Ipang :D
+ 1
Ipang we wrote same thing almost as same time: didn't see your answer when posting the same link ;)