JavaScript Inheritance and Object Programming

Coding Tutorial, Chapter 3a

Object Programming: Object to String

© 18 July, 2013, Martin Rinehart


Use alert()s (or console.log()s) to test your new function.


In a mixed script we put library functions at the top, class code in the middle and mainline at the bottom. You'll want the library functions at the top if your class code uses these functions. (And why else would you have them?) Mainline at the bottom is often the only choice as anonymous functions assigned to vars ( = function ...) are not hoisted.

A single test is shown.

Feedback: Martin Rinehart at gmail dot com.

# # #