113 Study Guide - Midterm Guide: Javascript

7 views13 pages

Document Summary

Step: oojs tutorial object oriented javascript(oojs) Variables or arrays are not sufficient to simulate real-life situations. Javascript permits you to create objects that act like real life objects. Employee or an office can be an object that have many unique characteristics of their own. We can create properties and methods to your objects to make programming easier. Example: var objname = new object(); objname. property1 = value1; objname. property2 = value2; objname. method1 = function() line of code. We can access properties of an object like this: objectname. propertyname; We can access methods of an object like this: objectname. methodname(); ""); var avg = student. calculateaverage(); document. write("average marks: " + avg); student. displaydetails(); Creating objects of this kind is not that useful because you will also have to create different objects for different students. Object constructor helps you create an object type which can be reused to meet the need of individual instance.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions