let names=['Jhon','David','Mark'];console.log(Array.isArray(names));// truelet user={id:1,name:'David'};console.log(Array.isArray(user));// falselet age 18;console.log(Array.isArray(age));// false
let fruit ='apple';let fruits =["apple","banana","mango","orange","grapes"];constisArray=(arr)=>Array.isArray(arr);console.log(isArray.(fruit));//output - falseconsole.log(isArray.(fruits));//output- true
// I know javascript can be hard but see this example and you will learn// Javascript if condition and array examplevar people =["filex","alex","jon"];var peopleNeeded = people[1];// 1 is the index bc the index starts from 0if(peopleNeeded <= people[1]){console.log("alex needed");}else{console.log("lol");}