Javascript

Javascript

Introduction of Javascript

JavaScript is the programming language of the web.

It can update and change both HTML and CSS.

It can calculate, manipulate and validate data.



JavaScript is one of the 3 languages all web developers must learn:

   1. HTML to define the content of web pages

   2. CSS to specify the layout of web pages

   3. JavaScript to program the behavior of web pages. 


Advantages of JavaScript


  • Saves time and bandwidth: Regardless of where you host JavaScript, it always gets executed on the client environment to save lots of bandwidth and make the execution process fast.
  • Easily send HTTP requests: In JavaScript, XMLHttpRequest is an important object that was designed by Microsoft. The object calls made by XMLHttpRequest as an asynchronous HTTP request to the server to transfer the data to both sides without reloading the page. 
  • Community :Global companies support community development by creating important projects. An example is Google (created the Angular framework) or Facebook (created the React. Js framework).
  • Vastly used: JavaScript is employed everywhere on the web.
  • Easy to use: It is not difficult to start working in JavaScript.

  • Backend usage: There are some ways to use JavaScript through Node.js servers. It is possible to develop a whole JavaScript app from front to back using only JavaScript.
  • Open source: Many open-source projects provide useful help for developers to add JavaScript.


Application of javascript 

1.Web Development 

Most of the developers use JavaScript for development, as it's efficient in both front-end and back-end. HTML gives structure to a page and CSS is used to give web pages their style, but JavaScript is absolutely necessary for dynamically updating features. It's used to make a web page interactive. 


2. Single Page Applications (SPAs)

One of the finest applications of JavaScript programming language is that we can create single page applications(spa)with the help of libraries like ReatJs, AngularJs, PolymerJs, and VueJS. Single Page Application


3. Mobile App Development 

There are so many frameworks of JavaScript, that are being used for developing web applications. Some of the popular JavaScript Frameworks for mobile apps development are as follows: 

  • Sencha ExtJS (Sencha Touch)
  • React Native
  • Ionic
  • Mobile Angular UI
  • Apache Cordova
  • jQuery Mobile
  • Ember.js
With these frameworks, we can use APIs(Application Programming Interfaces).


4.Game Development

One of the important applications of JavaScript is Game Development. 


JavaScript is used with HTML5 in developing games usually. For graphics in game development, the library EaselJS is used. Some of the games built with no JavaScript are: 

  • Tic Tac Toe
  • Snake Game
  • Hangman
  • Rock Paper Scissor etc.


5. Web Servers and Server Applications  

JavaScript is not only used for front-end development. The NodeJs framework of JS is used for the back end and also for creating these web servers. Because of this Node.js, and JavaScript runs on the server. NodeJs has an HTTP(Hypertext Transfer Protocol) module so it can build an HTTP server as well. Nodejs is designed to develop high-scaling servers.


In HTML, JavaScript code is inserted between <script> and </script> tags.javaScript is added to HTML in two ways - 

a) Internally:  JavaScript can be added to the HTML file using the "script" tag. 

<script>
         JS Code
               </script>

<!DOCTYPE html>
<html lang="en">
   
<head>
    <title>
        Basic Example to Describe JavaScript
    </title>
</head>
   
<body>
    <script>
        console.log("Welcome to weblanguage");
    </script>
</body>
   
</html>


b) Externally: To use JavaScript as an external file, first, we create a new file with (".js") extension. Then we link this file with our HTML file. This is how JavaScript is used in Web Development. Google, YouTube, Facebook,  Amazon,  LinkedIn, etc. some of the famous websites built using JavaScript. 

 

READ MORE<< JavaScript classes and objects

READ MORE << JavaScript Array


NEXT  


Post a Comment

0 Comments