I have observed that the class ([[Class]]) name and the
constructor name of an object often is the same!
function className( object )
{ return 0,
Object.prototype.toString.call( object ).
replace( "\[object ", "" ).replace( "\]", "" ); }
let n = new Number( 3.14 );
className( n ) /* Number */
n.constructor.name /* Number */
So now, I am trying to find differences between the class
name and the constructor name.
The first difference I found is: You can change the
constructor name, but not the class name.
n.constructor = String /* function String() */
n.constructor.name /* "String" */
className( n ) /* "Number" */
Any other differences?