JavaScript Introduction


JavaScript Introduction

Javascript is an interpreted programming language that's lightweight. Create network-centric apps with this tool. When applied to an HTML document, it is a full-featured, interpreted programming language that enables dynamic interactivity on websites. It was introduced in 1995 to allow users of Netscape Navigator to add programs to web pages. Since then, all other graphical web browsers have incorporated it.

Why learn it?

It is a MUST for students and working professionals to learn Javascript if they want to become brilliant Software Engineers, especially if they are working in the Web Development field. A few of the primary advantages of knowing Javascript are as follows:

  • In addition to its popularity, Js is an attractive choice for programmers. Once you've mastered Javascript, you'll be able to create outstanding front-end and back-end software utilizing jQuery, Node.JS, and other Javascript-based frameworks.
  • Javascript is available in every current web browser, so you don't need to set up a separate environment to study it. In addition to Chrome, Mozilla Firefox, and Safari (and every other browser you're familiar with today), Javascript is also supported by Internet Explorer.
  • It allows you to construct stunning and incredibly quick web pages. The most satisfactory Graphical User Experience can be achieved by developing your website with a console-like look and feel.
  • Android and iOS apps, as well as games, are now developed using JavaScript. Because of this, Javascript Programmers have a lot of opportunities.
  • JavaScript knowledge is in high demand, resulting in many new jobs and a good salary. See what it looks like to have JavaScript skills in the job market by visiting different sites.
  • It's a great thing about Javascript. There are loads of frameworks and libraries that have already been built and can be utilized straight in software development to shorten the time required for getting a product to the market.

Many reasons exist for learning Javascript Programming. However, one thing is certain: to master any programming language, not just JavaScript; you have to keep on coding.

Example No.1:

<html> <body> <h2>Knowledge2life</h2> <p id="demo">Website</p> <button type="button" onclick='document.getElementById("demo").innerHTML = "Welcome to Knowledge2life!"'>Click Me!</button> </body> </html>

OUTPUT:

Knowledge2life

Website

Example No.2:

<html> <body> <h2>Knowledge2life</h2> <button onclick="document.getElementById('myImage').src='pic_bulbon.gif'">Turn on the light</button> <img id="myImage" src="pic_bulboff.gif" style="width:100px"> <button onclick="document.getElementById('myImage').src='pic_bulboff.gif'">Turn off the light</button> </body> </html>

OUTPUT:

Knowledge2life

img_for_js