JavaScript

Ajay Vignesh J
3 min readApr 6, 2020

Language Origin:

JavaScript is an object oriented programming language and it is used to create interactive effects within the web browsers. It was originated and developed by Netscape as a means to add dynamic and interactive elements to websites. JavaScript is the only language for client side web development. However several languages can be rewritten by a computer, via a process known as compilation, into JavaScript.

JavaScript:

JavaScript is a client-side scripting language, which means the code is processed within the browser itself (Client side) rather than on the server side. This means JavaScript functions and coding can run after a web page has loaded without interacting with the server. For example, a JavaScript function may check a web form before it is submitted to make sure all the required inputs have been filled out correctly. The JavaScript code can produce an error message before any information is actually transmitted to the server.

Like server-side scripting languages, like PHP JavaScript code can be inserted anywhere within the HTML coding. However, only server-side code is displayed in the HTML, while JavaScript code remains fully visible in the source of the web page. It can also be referenced in a separate .JS file, which may also be viewed in a browser.

JavaScript engines were originally used only in web browsers, but they are now embedded in server-side website deployments, usually via Nodejs. They are also embedded in a variety of applications created with frameworks such as Electron and Cordova.

The use of JavaScript has expanded beyond its web browser roots. Java script are now embedded in a variety of other software systems, both for server side website deployments and non-browser application.

Function in Javascript:

Functions as methods, Unlike many object-oriented languages, there is no distinction between a function definition and a method definition. Rather, the distinction occurs during function calling; when a function is called as a method of an object, the function’s local this keyword is bound to that object for that invocation.

Dynamic:

Typing JavaScript is dynamic like most other scripting languages. A type is associated with a value rather than an expression. For example, a variable initially bound to a number may be reassigned to a string. JavaScript supports various ways to test the type of objects, including duck typing. Run-time evaluation JavaScript includes an eval function that can execute statements provided as strings at run-time

JavaScript Uses:

Some of the uses of Java scripts are as follows,

  • Web Development
  • Web Applications
  • Server Application
  • Presentations
  • Web servers
  • Games

Advantages of JavaScript:

Some of the advantages of Java script are,

  • Simplicity
  • Speed
  • Versatility
  • Server Load
  • Easy to Learn and Implement

When to avoid JavaScript:

Though the fact that JavaScript is a widely implemented and standardized language of all web browsers you should always check to see if what you are trying to accomplish can be done in HTML, CSS, or in a server side language first. This is because several older or low powered devices such as mobile phones have difficulties handling JavaScript. Also computers with higher security needs often disable JavaScript due to potential flaws. JavaScript is a very powerful tool, but remember to use it as simple as possible and look for alternative solutions.

--

--

Ajay Vignesh J

Analyst Programmer and Diabetics coffee Distributor