Table of contents Home page
Execute this code
var x = "Hello" alert(x.constructor == String) // Shows that x is a string object function ComplexNumber(r, i) { this.real = r this.imaginary = i } var y = new ComplexNumber(-9, 5) alert(y.constructor == String) // Shows that y is not a String object alert(y.constructor == ComplexNumber) // Shows that y is a ComplexNumber object