filmov
tv
JavaScript Object Constructor Notation - JavaScript Tutorial 72
![preview_player](https://i.ytimg.com/vi/sgLNZJO4_0w/maxresdefault.jpg)
Показать описание
Notes for You:: How to Create Objects using JavaScript Object Constructor Notation
Object constructor:
- is a constructor function of built in object called Object.
- is convenient to create a single object.
A) How to Create a new object using Object():
Syntax:
var objectName = new Object();
Example:
var rect1 = new Object();
new keyword in JavaScript:
a) Creates a new empty object.
c) Calls its Constructor function with "newly created memory location address" with "list of arguments" if passed.
d) Returns the reference of new object, if Constructor function does not return anything explicitly.
=========================================
Follow the link for next video:
JavaScript Tutorial 73 - How to Add or Delete a Property of an Object in JavaScript
Follow the link for previous video:
JavaScript Tutorial 71 - How to create Objects in JavaScript ?
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
Object constructor:
- is a constructor function of built in object called Object.
- is convenient to create a single object.
A) How to Create a new object using Object():
Syntax:
var objectName = new Object();
Example:
var rect1 = new Object();
new keyword in JavaScript:
a) Creates a new empty object.
c) Calls its Constructor function with "newly created memory location address" with "list of arguments" if passed.
d) Returns the reference of new object, if Constructor function does not return anything explicitly.
=========================================
Follow the link for next video:
JavaScript Tutorial 73 - How to Add or Delete a Property of an Object in JavaScript
Follow the link for previous video:
JavaScript Tutorial 71 - How to create Objects in JavaScript ?
=========================================
JavaScript Tutorials Playlist:-
=========================================
Watch My Other Useful Tutorials:-
jQuery Tutorials Playlist:-
jQuery UI Tutorials Playlist:-
Bootstrap Tutorials Playlist:-
=========================================
► Subscribe to our YouTube channel:
► Visit our Website:
=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
Комментарии