PROTOTYPING AND REGULAR EXPRESSIONS
This page shows some simple ways to use prototyping in JavaScript: to see the JavaScript code click on the
show code
label below, or have a look to the HTML source of this page. The tutorial introduces also the
implicit arguments and instanceof JavaScript features.
The run
function (contained in this page) implements three examples:
changeName
method to a custom class (the dog
class)adams
method to the Array implicit object (starting from the array [])