Objects In JavaScript Tutorial

Published: 09 October 2020
on channel: IT Knowledge Power
133
21

Objects in Javascript-
JavaScript is known as object oriented scripting language. Object plays important role i.e.in JavaScript object is everything. An object having both properties and methods. All real(tangible) things are called as objects.

Example car object.

Every car has different properties like model,color etc. Also methods like start,stop etc. Every car has same properties but different values. Methods are also same but perform differently.
Example-car as an object.
1.properties - name,model,color etc.
2.methods- start,stop etc.
Properties and methods of objects are accessed with ‘.’ Operator.
Example-
1.Property -
For accessing properties of an object,we write here as follows-
objectname.propertyname
e.g.var sms="Welcome to Javascript";
var len=sms.length;
Result is 21 Here blankspace is also calculated 1 character in it in result.
car.name=Maruti
car.model=Swift Dzire
car.color=red
2.Methods
In javascript we call a method and written as follows-
objectname.methodname()
E.g.var sms="Welcome to Javascript"
var u=sms.toLowerCase();
Result is welcome to javascript
car.start()
car.stop()

Types of objects in Javascript-

There are two of objects in javascript namely,
1.Built-in object
In Javascript there are 4 built in functions namely Array,Date,Math and String. Every object has special purpose properties and methods associated with it.
2.User defined object
As per user requirement user create its own objects in JavaScript. For creation of user defined objects 'new' keyword is used.
e.g.var cdate=new Date();

Online quiz in IT is a website which provides online IT Quizzes,notes and also helps for improve your knowledge in IT.This website also helps for Advanced Web designing,Javascript,Maharashtra,HSC,Board,PHP and SEO,E Commerce, IT Sector and XII IT students.learn programming on Android, learn JavaScript in marathi, learn html code in Android ,html for beginners, javascript for beginners, data types, operator, tutorial, web design, app development,


On this page of the site you can watch the video online Objects In JavaScript Tutorial with a duration of hours minute second in good quality, which was uploaded by the user IT Knowledge Power 09 October 2020, share the link with friends and acquaintances, this video has already been watched 133 times on youtube and it was liked by 21 viewers. Enjoy your viewing!