Quantcast
Channel: w3mentor » Object oriented Javascript
Viewing all articles
Browse latest Browse all 10

Example to illustrate Inheritance using JavaScript

$
0
0
In the example we define a base object called Car, and Create sub object called ferrari that inherits attributes from Car. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>JavaScript - Inheritance Example</title> </head>   <body> <p> <script language="JavaScript" type="text/JavaScript">     // ************************************************************************ //Define a Car object // ************************************************************************ function Car() { //Add […]
Continue reading...

Viewing all articles
Browse latest Browse all 10

Trending Articles