Explain what is an Object and also Explain Java Script Objects.
https://www.computersprofessor.com/2016/06/explain-what-is-object-and-also-explain.html?m=0
Java script tries to be an object
oriented language.
Object:- Object orientation is
one of the most powerful concept. Objects are widely applicable and object based
system can be developed using many languages. Traditional languages such as
COBAL (or) FORTRAN are not supported objects. An object is a thing it can be
anything that you write from some data through a set of methods to an entire
system.
Objects
are described in software and design constructs called “classes”. A ‘Class’
usually contains some data items and some methods. Each class provide services
to other classes in the system.
When
a program runs object’s are created. An object is a run time instance of the
class. The object has all of the behavior that was defined in the class and is
able to perform processing. An objects described by a class. A class usually
contains both data items and processing capabilities.
Java script objects:- The
built-in java script objects such as ‘document’ and ‘window’ are act and used
like standard object oriented objects.
New:- The keyword ‘new’ is used to create
objects. It allocates memory and storage for them. Whenever you define an
object you should make sure that all variables are set “string to” “ and
numbers to ‘o’ objects can have functions as well as variables.
This:- To differentiate
between global variables and those which are part of an object but may have the
same name, java script uses ‘this’, separate the variable name from ‘this’ with
a ‘dot’.