DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

  1. DZone
  2. Refcards
  3. Object-Oriented JavaScript
refcard cover
Refcard #174

Object-Oriented JavaScript

Advanced Techniques for Serious Web Applications

Covers advanced object-oriented techniques in JavaScript, including object creation, member scoping, namespaces, inheritance and modularization.

Download Refcard
Free PDF for Easy Reference
refcard cover

Written By

author avatar Ibrahim Levent
,
Table of Contents
► Introduction ► Comparison of Java and JavaScript ► Object Type Definition ► Object Creation ► Member Scoping ► Inheritance ► Modularization ► Custom Exceptions ► Custom Events ► Writing Components
Section 1

Introduction

By Ibrahim Levent

As HTML5 standards mature, JavaScript has become the de-facto programming language of the web for client-side environments, and is gaining ground rapidly on the server-side. As JavaScript code-bases grow larger and more complex, the object-oriented capabilities of the language become increasingly crucial. Although JavaScript's object-oriented capabilities are not as powerful as those of static server-side languages like Java, its current object-oriented model can be utilized to write better code.

In this Refcard, you'll learn how to write object-oriented code in JavaScript. Code samples include some EcmaScript 5 (JavaScript's specification) features and have been tested in Firefox 17, Chrome 23 and Internet Explorer 9.

Section 2

Comparison of Java and JavaScript

Java JavaScript
Statically typed Dynamically typed
Custom types are defined with class, interface or enum Custom types are defined with functions and prototypes
Types cannot be changed at runtime Types can be changed at runtime
Variables needs a type when declared (Strong typing) No type needed when variables are declared (Loose typing)
Constructors are special methods Constructor is just a function;  no distinction between function and constructor
Class and instance are different entities Everything is object; constructor functions and prototypes are also object
Static and instance members supported No direct static member support
Abstract types supported with abstract classes and interfaces No direct abstract type support
Good enough member scoping options; private, package, protected, public Only public members supported by language
Rich inheritance mechanism Poor prototypal inheritance
Method overloading and overriding possible No direct overloading and overriding support
Rich reflection features Some reflection features
Modularity with package support No direct package or module support
Section 3

Object Type Definition

Type Definition

Every function is also a type, and new instances of these functions can be created with the "new" operator. Function declaration can behave like a constructor, and in this case is called a Constructor Function. In constructor functions, prototype methods and fields can be accessed.

​x
1
function MyType(){
2
   if (!(this instanceof MyType))
3
        throw new Error("Constructor can't be called as a function");
4
}
5
var myInstance = new MyType();
6
MyType(); // Error: Constructor can't be called as a function
7
​

In Eclipse, object types can be easily inspected in the JavaScript perspective. Constructor, instance members, static members and inner functions are all separated in Outline View.

Inspecting Object Types

Instance Members

Instance members are accessed from instance objects which are created with the "new" operator. Instance members are created via "this" keyword, prototype, constructor closure or Object.defineProperty method.

18
1
function Cat(name){
2
        var voice = "Meow";
3
        this.name = name;
4
        this.say = function(){
5
                return voice;
6
}
7
}
8
Cat.prototype.eat = function(){
9
        return "Eating";
10
}
11
var cat = new Cat("Fluffy");
12
Object.defineProperty(cat, "numLegs",{value: 4,writable:true,enumerable:true,configurable:true});
13
​
14
console.log(cat.name); // Fluffy
15
console.log(cat.numLegs); // 4
16
console.log(cat.say()); // Meow
17
console.log(cat.eat()); // Eating
18
​

Static Members

There is no direct support for static members. Constructor functions are used to create static members. Static members can't be accessed with "this" keyword.

Public Static Members:

19
1
function Factory(){
2
}
3
​
4
// public static method
5
Factory.getType = function (){
6
return "Object Factory";
7
};
8
// public static field
9
Factory.versionId = "F2.0";
10
​
11
Factory.prototype.test = function(){
12
console.log(this.versionId); // undefined
13
console.log(Factory.versionId); // F2.0
14
console.log(Factory.getType()); // Object Factory
15
}
16
​
17
var factory = new Factory();
18
factory.test();
19
​

Private Static Members:

31
1
var Book = (function () {
2
        // private static field
3
        var numOfBooks = 0;
4
​
5
        // private static method
6
        function checkIsbn(isbn) {
7
                if (isbn.length != 10 && isbn.length != 13) 
8
                        throw new Error("isbn is not valid!");
9
        }
10
​
11
        function Book(isbn, title) {
12
                checkIsbn(isbn);
13
                this.isbn = isbn;
14
                this.title = title;
15
                numOfBooks++;
16
                this.getNumOfBooks = function () {
17
                        return numOfBooks;
18
                }
19
​
20
        }
21
        return Book;
22
})();
23
​
24
var firstBook = new Book("0-943396-04-2", "First Title");
25
console.log(firstBook.title); // First Title
26
console.log(firstBook.getNumOfBooks()); // 1
27
var secondBook = new Book("0-85131-041-9", "Second Title");
28
console.log(firstBook.title); // First Title
29
console.log(secondBook.title); // Second Title
30
console.log(firstBook.getNumOfBooks()); // 2
31
console.log(secondBook.getNumOfBooks()); // 2

Abstract Types

JavaScript is a loosely typed language, so you don't have to specify the variable type of a variable when you declare it and pass as an argument. This reduces the need for abstract types like interfaces. But abstract types may be needed to collect common functionality when inheritance is used.

31
1
(function(){
2
​
3
var abstractCreateLock = false;
4
// abstract type
5
function BaseForm(){
6
        if(abstractCreateLock)
7
                throw new Error("Can't instantiate BaseForm!");
8
}
9
BaseForm.prototype = {};
10
BaseForm.prototype.post = function(){
11
        throw new Error("Not implemented!");
12
}
13
​
14
function GridForm(){
15
}
16
​
17
GridForm.prototype = new BaseForm();
18
abstractCreateLock = true;
19
GridForm.prototype.post = function(){
20
        // ...
21
        return "Grid is posted.";
22
}
23
​
24
window.BaseForm = BaseForm;
25
window.GridForm = GridForm;
26
​
27
})();
28
​
29
var myGrid = new GridForm();
30
console.log(myGrid.post()); // Grid is posted.
31
var myForm = new BaseForm(); // Error: Can't instantiate BaseForm!

Interfaces

There is no direct interface or virtual class support in JavaScript. It can be mimicked as below, leaving a method signature check:

34
1
var Interface = function (name, methods) {
2
        this.name = name;
3
        // copies array
4
        this.methods = methods.slice(0);
5
};
6
​
7
Interface.checkImplements = function (obj, interfaceObj) {
8
        for (var i = 0; i < interfaceObj.methods.length; i++) {
9
                var method = interfaceObj.methods[i];
10
                if (!obj[method] || typeof obj[method] !== "function")
11
                        throw new Error("Interface not implemented! Interface: " + interfaceObj.name + " Method: " + method);
12
        }
13
};
14
var iMaterial = new Interface("IMaterial", ["getName", "getPrice"]);
15
​
16
function Product(name,price,type){ 
17
        Interface.checkImplements(this, iMaterial);
18
        this.name = name;
19
        this.price = price;
20
        this.type = type;
21
}
22
​
23
Product.prototype.getName = function(){
24
        return this.name;
25
};
26
​
27
Product.prototype.getPrice = function(){
28
        return this.price;
29
};
30
​
31
var firstCar = new Product("Super Car X11",20000,"Car");
32
console.log(firstCar.getName()); // Super Car X11
33
delete Product.prototype.getPrice;
34
var secondCar = new Product("Super Car X12",30000,"Car"); // Error: Interface not implemented! Interface: IMaterial Method: getPrice

Singleton Objects

29
1
var Logger = {
2
        enabled:true,
3
        log: function(logText){
4
                if(!this.enabled)
5
                        return;
6
                if(console && console.log)
7
                        console.log(logText);
8
                else
9
                        alert(logText);
10
        }
11
}
12
​
13
Or
14
​
15
function Logger(){
16
}
17
Logger.enabled = true;
18
Logger.log = function(logText){
19
        if(!Logger.enabled)
20
                return;
21
        if(console && console.log)
22
                console.log(logText);
23
        else
24
                alert(logText);
25
};
26
​
27
Logger.log("test"); // test
28
Logger.enabled = false; 
29
Logger.log("test"); //
Section 4

Object Creation

With "new" Operator

Instances of built-in or user-defined object types can be created with the "new" operator. The "new" operator runs only with constructor functions. An already created object can't be used with "new" again. First, the "new" operator creates an empty object; then it calls the constructor function while assigning the newly created object as "this". The constructor function runs with the given arguments, performing its coded initializations.

13
1
//or var dog = {};
2
//or var dog = new MyDogType();
3
var dog = new Object();
4
dog.field1 = "Scooby";
5
dog.owner = {};
6
dog.owner.name = "Mike";
7
dog.bark = function(){
8
        return "Woof";
9
};
10
​
11
console.log(dog.field1); // Scooby
12
console.log(dog.owner.name); // Mike 
13
console.log(dog.bark()); // Woof

With Object Literal

It is very easy to create objects with object literal. It is also possible to create nested objects.

13
1
var dog = {
2
        name:"value1",
3
        owner:{
4
                name:"Mike"
5
        },
6
        bark:function(){
7
                return "Woof";
8
        }
9
};
10
​
11
console.log(dog.name); // Scooby
12
console.log(dog.owner.name); // Mike 
13
console.log(dog.bark()); // Woof
Section 5

Member Scoping

Private Fields

In JavaScript, there is no built-in private field support. But this support can be achieved with constructor closures. Variables defined within a constructor function can be used as private fields. Any methods using private fields should be declared in the constructor function (note that prototype methods can't be declared in the constructor function and used with private fields). Private setter and getter functions should be declared in the constructor function.

27
1
function Customer(){
2
        // private field
3
        var risk = 0;
4
​
5
        this.getRisk = function(){
6
                return risk;
7
        };
8
        this.setRisk = function(newRisk){
9
                risk = newRisk;
10
        };
11
        this.checkRisk = function(){
12
                if(risk > 1000)
13
                        return "Risk Warning";
14
                return "No Risk";
15
        };
16
}
17
​
18
Customer.prototype.addOrder = function(orderAmount){
19
        this.setRisk(orderAmount + this.getRisk());
20
        return this.getRisk();
21
};
22
​
23
var customer = new Customer();
24
​
25
console.log(customer.getRisk()); // 0
26
console.log(customer.addOrder(2000)); // 2000
27
console.log(customer.checkRisk()); // Risk Warning

Private Methods

Also called "Nested" or "Inner Functions". Private methods are defined within another function and can't be accessed from outside. Private methods can be declared in any part of a function.

32
1
function Customer(name){
2
        var that = this;
3
        var risk = 0;
4
        this.name = name;
5
        this.type = findType();
6
        // private method
7
        function findType() {
8
                console.log(that.name);
9
                console.log(risk);
10
                return "GOLD";
11
        }
12
}
13
​
14
Or
15
​
16
function Customer(name){
17
        var that = this;
18
        var risk = 0; 
19
        this.name = name;
20
        // private method
21
        var findType = function() {
22
                console.log(that.name);
23
                console.log(risk);
24
                return "GOLD";
25
        };
26
        this.type = findType();
27
}
28
​
29
var customer = new Customer("ABC Customer"); // ABC Customer
30
                                       // 0
31
console.log(customer.type); // GOLD
32
console.log(customer.risk); // undefined

If a private inner function is returned outside, its methods can be called from outside:

12
1
function Outer(){
2
        return new Inner();
3
​
4
        //private inner
5
        function Inner(){
6
                this.sayHello = function(){
7
                        console.log("Hello");
8
                }
9
        }
10
}
11
​
12
(new Outer()).sayHello(); // Hello

Privileged Methods

Prototype methods can't access private fields; everything attached to them is also "public". We need a way to declare methods so that (a) they are accessible publicly and (b) they can access private members, which means privileged or protected access. For this purpose, the following code can be used:

18
1
function Customer(orderAmount){
2
        // private field
3
        var cost = orderAmount / 2;
4
        this.orderAmount = orderAmount;
5
        var that = this;
6
​
7
        // privileged method
8
        this.calculateProfit = function(){
9
                return that.orderAmount - cost; 
10
        };
11
}
12
​
13
Customer.prototype.report = function(){
14
        console.log(this.calculateProfit());
15
};
16
​
17
var customer = new Customer(3000);
18
customer.report(); // 1500

Public Fields

For public fields, prototype or instance can be used. Prototype fields and methods are shared by new instances. (Prototype objects are also shared). If a new instance changes the field or method in its object, the change is not reflected in other instances. To change all instances, we need to change it in the prototype object.

56
1
function Customer(name,orderAmount){
2
        // public fields
3
        this.name = name;
4
        this.orderAmount = orderAmount;
5
}
6
Customer.prototype.type = "NORMAL";
7
​
8
Customer.prototype.report = function(){
9
        console.log(this.name);
10
        console.log(this.orderAmount);
11
        console.log(this.type);
12
        console.log(this.country);
13
};
14
​
15
Customer.prototype.promoteType = function(){
16
        this.type = "SILVER";
17
};
18
​
19
var customer1 = new Customer("Customer 1",10);
20
// public field
21
customer1.country = "A Country";
22
customer1.report(); // Customer 1
23
                    // 10
24
                    // NORMAL
25
                    // A Country
26
​
27
var customer2 = new Customer("Customer 2",20);
28
customer2.promoteType();
29
console.log(customer2.type); // SILVER
30
console.log(customer1.type); // NORMAL
31
​
32
Public Methods
33
Prototype methods are public. Any methods attached to "this" are also public.
34
function Customer(){
35
        // public method
36
        this.shipOrder = function(shipAmount){
37
                return shipAmount;
38
        };
39
}
40
// public method
41
Customer.prototype.addOrder = function (orderAmount) {
42
        var totalOrder = 0;
43
        for(var i = 0; i < arguments.length; i++) {
44
                totalOrder += arguments[i];
45
        }
46
        return totalOrder;
47
};
48
​
49
var customer = new Customer();
50
// public method
51
customer.findType = function(){
52
        return "NORMAL";
53
};
54
console.log(customer.addOrder(25,75)); // 100
55
console.log(customer.shipOrder(50)); // 50
56
console.log(customer.findType()); // NORMAL
Section 6

Inheritance

There are different ways to implement inheritance in JavaScript. "Prototypal Inheritance" – using prototype as an inheritance mechanism – has many advantages. For example:

55
1
function Parent(){
2
        var parentPrivate = "parent private data";
3
        var that = this;
4
        this.parentMethodForPrivate = function(){
5
                return parentPrivate;
6
        }; 
7
        console.log("parent");
8
}
9
Parent.prototype = {
10
        parentData: "parent data",
11
        parentMethod: function(arg){
12
                return "parent method"; 
13
        },
14
        overrideMethod: function(arg){
15
                return arg + " overriden parent method"; 
16
        }
17
}
18
​
19
function Child(){
20
// super constructor is not called, we have to invoke it
21
        Parent.call(this);
22
        console.log(this.parentData);
23
        var that = this;
24
        this.parentPrivate = function(){
25
                return that.parentMethodForPrivate();
26
        };
27
        console.log("child");
28
}
29
​
30
//inheritance
31
Child.prototype = new Parent();// parent
32
Child.prototype.constructor = Child;
33
​
34
//lets add extented functions
35
Child.prototype.extensionMethod = function(){
36
        return "child's " + this.parentData;
37
};
38
​
39
//override inherited functions
40
Child.prototype.overrideMethod = function(){
41
        //parent's method is called
42
        return "Invoking from child" + Parent.prototype.overrideMethod.call(this, " test");
43
}
44
​
45
var child = new Child();// parent
46
                // parent data 
47
                // child
48
console.log(child.extensionMethod()); //child's parent data
49
console.log(child.parentData); //parent data
50
console.log(child.parentMethod()); //parent method
51
console.log(child.overrideMethod()); //Invoking from child test overriden parent method
52
console.log(child.parentPrivate()); // parent private data
53
​
54
console.log(child instanceof Parent); //true
55
console.log(child instanceof Child); //true

When a member of child object is accessed, it is searched from the object's members. If it is not found there, then it is searched in its prototype object. If it is not found there, then it is searched in the parent object's members and prototype. It is searched up to the Object's prototype. This hierarchy is also called the "Prototype chain". The following diagram illustrates the chain:

inheritance

Section 7

Modularization

Once we have many custom object types, we need to group them and manage their visibility, dependencies, and loading. "Namespace and Module Pattern" can be used to handle these tasks. (Note that EcmaScript version 6 (Harmony) is beginning to develop a full-fledged module system. Until it is implemented by browsers, there are some useful libraries to facilitate these features.)

Namespaces

There is no direct namespace support in JavaScript. We can create namespace via objects and fill our object types in object properties:

7
1
//create namespace
2
var myLib = {};
3
myLib.myPackage = {};
4
​
5
//Register types to namespace
6
myLib.myPackage.MyType1 = MyType1;
7
myLib.myPackage.MyType2 = MyType2;

Modules

Modules are a way of dividing our JavaScript code-base into packages. Modules export some object type definitions and import other modules. The module system loads each module and its dependencies. First it runs the dependencies in appropriate order; then the module code is executed. Some libraries can be used for this purpose.

In modules, we define new types, import some types from other modules and export our public types. Here is an example of a module definition:

16
1
Module.define("module1.js",["dependent_module1.js","dependent_module2.js",...], function(dependentMod1, dependentMod2) { //IMPORTS
2
​
3
//TYPE DEFINITIONS
4
function ExportedType1(){
5
        // use of dependent module's types
6
        var dependentType = new dependentMod1.DependentType1();
7
        ...
8
}
9
function ExportedType2(){
10
}
11
...
12
​
13
// EXPORTS
14
return { ExportedType1: ExportedType1, ExportedType2: ExportedType2,...};
15
​
16
});

To use a module (can work asynchronously or synchronously):

5
1
Module.use(["module1.js"], function(aModule){
2
        console.log("Loaded aModule!");
3
        var AType = aModule.AnExportedType;
4
        var atype1Instance = new AType();
5
});
Section 8

Custom Exceptions

In JavaScript, there are built-in exceptions like Error, TypeError and SyntaxError which may be created and thrown during runtime. Every exception is "unchecked". An ordinary object can be used as an exception with throw statement. Thus, we can create our own custom exceptions and throw and catch them. It is good practice to write exceptions that extend JavaScript's standard Error object.

67
1
function BaseException() {
2
}
3
BaseException.prototype = new Error();
4
BaseException.prototype.constructor = BaseException;
5
​
6
BaseException.prototype.toString = function(){
7
        // note that name and message are properties of Error
8
        return this.name + ": " + this.message;
9
};
10
​
11
function NegativeNumberException(value) {
12
        this.name = "NegativeNumberException";
13
        this.message = "Negative number! Value: " + value;
14
}
15
NegativeNumberException.prototype = new BaseException();
16
NegativeNumberException.prototype.constructor = NegativeNumberException;
17
​
18
function EmptyInputException() {
19
        this.name = "EmptyInputException";
20
        this.message = "Empty input!";
21
}
22
EmptyInputException.prototype = new BaseException();
23
EmptyInputException.prototype.constructor = EmptyInputException;
24
​
25
var InputValidator = (function(){
26
​
27
var InputValidator = {};
28
InputValidator.validate = function(data){
29
        var validations = [validateNotNegative,validateNotEmpty];
30
        for(var i = 0; i < validations.length; i++){
31
                try {
32
                        validations[i](data);
33
                }
34
                catch (e) {
35
                        if (e instanceof NegativeNumberException) {
36
                                //re-throw
37
                                throw e;
38
                        }
39
                        else if (e instanceof EmptyInputException) {
40
                                // tolerate it
41
                                data = "0";
42
                        }
43
                }
44
        }
45
};
46
return InputValidator;
47
​
48
function validateNotNegative(data){
49
                if (data < 0)
50
                        throw new NegativeNumberException(data);
51
}
52
function validateNotEmpty(data){
53
                if (data == "" || data.trim() == "")
54
                        throw new EmptyInputException();
55
}
56
​
57
})();
58
​
59
try{
60
        InputValidator.validate("-1");
61
}
62
catch(e){
63
        console.log(e.toString()); // NegativeNumberException: Negative number! Value: -1
64
}
65
finally{
66
        console.log("Validation is done."); // Validation is done.
67
}
Section 9

Custom Events

Custom events reduce code complexity and decrease coupling of objects. Here is a typical event pattern:

35
1
function EventManager(){
2
}
3
var listeners = {};
4
​
5
EventManager.fireEvent = function(eventName, eventProperties) {
6
        if (!listeners[eventName]) 
7
                return;
8
​
9
        for (var i = 0; i < listeners[eventName].length; i++) {
10
                listeners[eventName][i](eventProperties);
11
        }
12
};
13
​
14
EventManager.addListener = function(eventName, callback) {
15
        if (!listeners[eventName]) 
16
                listeners[eventName] = [];
17
        listeners[eventName].push(callback);
18
};
19
​
20
EventManager.removeListener = function(eventName, callback) {
21
        if (!listeners[eventName]) 
22
                return;
23
        for (var i = 0; i < listeners[eventName].length; i++) {
24
                if (listeners[eventName][i] == callback) {
25
                        delete listeners[eventName][i];
26
                        return;
27
                }
28
        }
29
};
30
​
31
EventManager.addListener("popupSelected", function(props){
32
        console.log("Invoked popupSelected event: " + props.itemID);
33
});
34
​
35
EventManager.fireEvent("popupSelected", {itemID:"100"}); // Invoked popupSelected event: 100
Section 10

Writing Components

JavaScript lets developers add new behaviors to HTML elements. These enrichments can be combined in a component structure. There is a continuing specification work by the W3C on "Web Components". Here is a commonly used pattern to bind JavaScript objects to DOM objects. In this way, we can collect behaviors and manage their lifecycles.

1- Define JavaScript Component:

16
1
function InputTextNumberComponent(domElement){
2
        this.initialize(domElement);
3
}
4
​
5
InputTextNumberComponent.prototype.initialize = function(domElement){
6
        domElement.onchange = function(){
7
                //just a format
8
                domElement.value = "-" + domElement.value + "-";
9
        };
10
domElement.jsComponent = this; //Expando property
11
        this.domElement = domElement;
12
};
13
​
14
InputTextNumberComponent.prototype.resetValue = function(){
15
        this.domElement.value = "";
16
};

2- Define CSS Class to Correlate HTML Elements with JavaScript Components:

3
1
<style type="text/css">
2
.inputTextNumber { text-align:right; }
3
</style>

HTML element should be as follows:

1
1
<input type="text" class="inputTxtNumber" name="NumberField" size="10" value="Click me!" onClick="this.jsComponent.resetValue()">

3- When page is loaded (or DOM ready), detect HTML elements and create components:

6
1
window.onload = function(){
2
        var inputTextNumbers = document.getElementsByClassName("inputTextNumber");
3
        for(var i = 0; i < inputTextNumbers.length; i++){
4
                var myComp = new InputTextNumberComponent(inputTextNumbers.item(i));
5
        }
6
};

Like This Refcard? Read More From DZone

related article thumbnail

DZone Article

Getting Started With Moment.js: Introduction With Examples
related article thumbnail

DZone Article

An Introduction to Node.js (Part 1)
related article thumbnail

DZone Article

Easy JavaScript Part 13: Four Ways to Create Objects in JavaScript
related article thumbnail

DZone Article

Using Python Libraries in Java
related refcard thumbnail

Free DZone Refcard

Getting Started With Low-Code Development
related refcard thumbnail

Free DZone Refcard

JavaScript Test Automation Frameworks
related refcard thumbnail

Free DZone Refcard

Salesforce Application Design
related refcard thumbnail

Free DZone Refcard

E-Commerce Development Essentials

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: