Some points about JavaScript which is useful from those points about JavaScript you can easily get an idea about that.
JavaScript
- JavaScript is an object oriented programming language.
- There is no multiple processor in JavaScript.
- It is a single threaded language.
- JavaScript is to program the behavior of web pages
- JavaScript programs run using a single thread.
- JavaScript does not wait for I/O operations.
- JavaScript and Java is completely different
- It is synchronous
- JavaScript can have static methods and variables.
- It supports object oriented programming.
- JavaScript accepts both double and single quotes
JavaScript classes, objects and prototypes
JavaScript introduced a feature to create classes that prevents accessing the wrong context when using the object properties and methods, which is normally the global scope or the window object.
All JavaScript objects are created from the Object constructor. JavaScript object instances can be created using the new keyword or with a function constructor. When ‘new’ keyword is used, new object is created and it assigned as ‘this’ for the duration of call to the constructor function.
JavaScript functions has a reference to another object called Prototype which can be used when creating objects, for inheritance and adding methods to a JavaScript class. The Prototype allows to add new methods to objects constructor
Callbacks and Promises
Callback is a function that is being passed to an async task and on completion the function will be executed.
Promise is an object that is being returned from async tasks. Promise have properties to deal with async operations synchronously
Comments
Post a Comment