easyJS ES5#62

typeof vs instanceof

Prompt

Write typeChecker(value) returning a string describing the value's type. It must return 'null' for null (not 'object'), 'array' for arrays, 'date' for Date instances, and fall back to typeof for everything else.

Hints

Solution

Your Code

5 min

Tests

Click Run to test your code