JavaScript is an Object Oriented Programming (OOP) language.
JS is an object-oriented programming language (Object-Oriented ).
An OOP language allows you to define your own objects and make your own variable types.
The OOP language allows you to customize object and variable types.
--------------------------------------------------------------------------------
Object Oriented Programming
Programming of placement objects
JavaScript is an Object Oriented Programming (OOP) language. An OOP language allows you to define your own objects and make your own variable types.
JS is the (OOP) language, which allows you to define... (same as above)
However, creating your own objects will be explained later, in the Advanced JavaScript section. we will start by looking at the built-in JavaScript objects, and how they are used. the next pages will explain each built-in JavaScript object in detail.
However, we will introduce how to create custom objects in advanced JS later. We will begin to observe the built-in JS objects and how to use them. The next page will detail each built-in JS object
Note that an object is just a special kind of data. An object has properties and methods.
Note that the object is only a special type of data. Objects have attributes and methods.
--------------------------------------------------------------------------------
Properties
Attribute
Properties are the values associated with an object.
Attribute is the object's connected Value
In the following example we are using the length property of the String object to return the number of characters in a string:
In the following example, we use the Length attribute of a string object to return the number of characters:
<Script type = "text/javascript">
Var txt = "Hello World! "
Document. write (txt. length)
</Script>
The output of the code above will be:
The above code will output:
12
--------------------------------------------------------------------------------
Methods
Method
Methods are the actions that can be stored med on objects.
Object methods can be executed.
In the following example we are using the toUpperCase () method of the String object to display a text in uppercase letters:
The following example uses the toUpperCase () method of the string object to display uppercase characters:
<Script type = "text/javascript">
Var str = "Hello world! "
Document. write (str. toUpperCase ())
</Script>
The output of the code above will be:
The above code output:
Hello world!