Nice but there are some errors
like in tip 7 there should not be . after the isArray and there shouldn't be a , at the end it should be ;
.
isArray
,
;
fixed code
let fruit = 'apple'; let fruits = ["apple", "banana", "mango", "orange", "grapes"]; const isArray = (arr) => Array.isArray(arr); console.log(isArray(fruit)); //output - false console.log(isArray(fruits)); //output- true
Poe's Law (look it up if you need to it's an essential part of modern internet vocabulary)
As in surely, when I read this, I read it as a parody, a joke ...
Replacing this:
console.log(Array.isArray(fruit)); //output - false
with this:
console.log(isArray(fruit)); //output - false
is a killer one-liner indeed. Well the killer one-liner is in fact:
const isArray = (arr) => Array.isArray(arr);
As in, it's one line, no-one needs (a killer).
And on a close inspection the errors aside (a hasty post it seems) they all seem to be in jest.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice but there are some errors
like in tip 7
there should not be
.after theisArrayand there shouldn't be a,at the end it should be;fixed code
Poe's Law (look it up if you need to it's an essential part of modern internet vocabulary)
As in surely, when I read this, I read it as a parody, a joke ...
Replacing this:
with this:
is a killer one-liner indeed. Well the killer one-liner is in fact:
As in, it's one line, no-one needs (a killer).
And on a close inspection the errors aside (a hasty post it seems) they all seem to be in jest.