DEV Community

Functional Javascript
Functional Javascript

Posted on

isObj (Test if a value is an Object instance

Alt Text


The two arrays (aTrue and aFalse) contain...

  • 8 examples of "true" values
  • 24 examples of "false" values

The bottom line of the logged output (right pane) which printed, "isObj 1e+9: 1.686s"
reads as, "the isObj func was run in a loop 1 billion times and took 1.6 second".

Note that (8 + 24) * 1B = 32 billion times the isObj func was called in 1.6 seconds

Source Code at:

Top comments (0)