Skip to content

Instantly share code, notes, and snippets.

@blaja blaja/.js
Created Aug 8, 2015

What would you like to do?
Inspecting internal [[class]] of objects in JS
// NOTE: this is specification dependent classification. It has nothing to do with formal class programming concept.
// The value of the [[Class]] internal property is defined by specification for every kind of built-in object.
// The value of the [[Class]] internal property of a host object may be any String value except one of:
// "Arguments", "Array", "Boolean", "Date", "Error", "Function", "JSON", "Math", "Number", "Object", "RegExp", and "String".
// The value of a [[Class]] internal property is used internally to distinguish different kinds of objects.{}); // "[object Object]"[]); // "[object Array]"{}); // "[object Function]"''); // "[object String]"; // "[object Number]"; // "[object Boolean]"''/); // "[object RegExp]" Date); // "[object Date]" Error); // "[object Error]"; // "[object Math]"; // "[object JSON]"{return arguments;}()); // "[object Arguments]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.