Add member function : Member Function : Object Oriented JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Object Oriented » Member Function »

 

Add member function

















<html>
<head>
<title>Example</title>
</head>
<body>
<script type="text/javascript">
function myObj() {
    alert("hi");
}

myObj.alternate = function() {
    alert("hola");
};

myObj();
myObj.alternate();

</script>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Object Oriented
» Member Function