Object Oriented Programming in Javascript Tutorial

Object Oriented Javascript Tutorial


Hello, All as the title suggest we are going to understand what is object-oriented in JS

for those we don't have knowledge about Object Oriented Programming language, let's understand the terminology out OOP Language.

OOP language is totally based on objects where the objects contain data, methods, and its attributes.

let's take a realtime example as follows:

Object Oriented Javascript

I have fruits which are as follows as Banana, Orange, Lemon, Apple, Mango etc, so if I want to find a number of fruits I have then I can use length function to find out.

The same way in  Javascript fruits array is an object which has some properties and methods like 

length is a property of array and sort is the method of an object.


Nowadays, the Object-oriented Programming language is the more popular style for the programming language, and Javascript has taken the OOP concept from the scratch only.

If we go deep in Javascript's functions we will get the idea that Javascript already using the Object-oriented style, and everything in Javascript is an object.

But there is also one point we need to understand not all things are an object in Javascript.
There are some other things are there as well which we call as primitive types. 
Like string, boolean, null etc are primitive types.

let's check null,
null don't have any method or property so we cant expand it, so this way there are some other primitive types are there in JS.

Conclusion:

So in shorts, everything in javascript is an object, and we use OOP concepts in our coding using some OOP terminologies which we will discuss later on this series.

So click here to understand what is mean by Objects in Javascript.
Object Oriented Programming in Javascript Tutorial Object Oriented Programming in Javascript Tutorial Reviewed by Vikas Kad on Monday, September 17, 2018 Rating: 5

2 comments:

  1. I like the way you explained it. Object oriented programming in JavaScript is very different from object-oriented programming in other languages and it confuses me. Fortunately, degree holding programming experts from Assignment Expert assist me with up-to-date knowledge and clear explanation of terms and language.I know I can rely on them anytime regardless of the deadline needed. It’s very convenient! Highly recommend!

    ReplyDelete

Powered by Blogger.