Page 318 - Webapplication11_C11_Flipbook
P. 318
Ð ÐFunctional Style: JavaScript uses a functional approach; objects are created using constructor functions, and each
constructor function represents a distinct object-type. Functions in JavaScript can also be used as objects and
passed to other functions.
Ð ÐInterpreted Language: JavaScript is an interpreted language, which means the script written inside JavaScript is
processed line by line. These scripts are interpreted by the JavaScript interpreter, which is a built-in component of
the Web browser.
Ð ÐBrowser Support: JavaScript is supported by all the browsers used nowadays. There is no need to install any external
software to execute the code of JavaScript.
There are some benefits and drawbacks to using JavaScript. Many of these are due to the fact that JavaScript is
frequently executed directly in a client’s browser. However, there are other ways to use JavaScript that provide the
same benefits as server-side languages.
Advantages of JavaScript
Some of the advantages of using Java Script are as follows:
ÐIt is faster than other scripting languages because it runs within the client’s browser.
Ð
Ð ÐIt reduces server load because it runs on the client side.
Ð ÐIt is popular, which is one of the main advantages of JavaScript because you can get help for your projects from
online tutorials and forums.
Ð ÐIt has the ability to insert dynamic text into an HTML page.
Ð ÐIt has the ability to read and modify the contents of an HTML element.
Ð ÐIt is still one of the capable scripting languages used to create visually appealing web projects. You can add features
like drag-and-drop and components like sliders, which will greatly improve the interface and give the site a more
professional appearance.
ÐIt is simpler to learn than other programming languages such as C++.
Ð
Ð ÐNowadays, browsers include a JavaScript Just in Time (JIT) compiler, so the code does not need to be compiled
externally while running.
Disadvantages of JavaScript
Because JavaScript is a client-side scripting language, it functions as an interpreter rather than a compiler. Aside from its
benefits, JavaScript has a number of disadvantages that can arise.
Some of them are as follows:
Ð ÐThe most significant drawback of JavaScript is that its code is visible to everyone, so anyone can make changes to
the code easily.
Ð ÐIt is very slow as compared to HTML. So, in cases with low networks, users face problems with HTML getting loaded
quickly but not JavaScript.
Ð ÐIt is sometimes interpreted differently by different browsers. Different layout engines may render JavaScript
differently, resulting in inconsistency in terms of functionality and interface.
Do You Know?
There are about 1.7 billion websites on the Internet from which 95% websites use
JavaScript.
316 Touchpad Web Applications-XI

