What Is Javascript

JavaScript is the world’s most popular programming language. JavaScript is the programming language of the Web. JavaScript is easy to learn.


JavaScript

JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.

JavaScript is versatile and beginner-friendly. With more experience, you’ll be able to create games, animated 2D and 3D graphics, comprehensive database-driven apps, and much more!

JavaScript itself is relatively compact, yet very flexible. Developers have written a variety of tools on top of the core JavaScript language, unlocking a vast amount of functionality with minimum effort. These include:

  • Browser Application Programming Interfaces (APIs) built into web browsers, providing functionality such as dynamically creating HTML and setting CSS styles; collecting and manipulating a video stream from a user’s webcam, or generating 3D graphics and audio samples.
  • Third-party APIs that allow developers to incorporate functionality in sites from other content providers, such as Twitter or Facebook.
  • Third-party frameworks and libraries that you can apply to HTML to accelerate the work of building sites and applications.

Sample Code

Add the following code inside a blank .html, and open it in your browser of choice

<!DOCTYPE html>
<html>
  <body>
    <style>
      h1 {
        color: pink;
        font-size: 3rem;
      }
      p {
        color: cyan;
        font-size: 1rem;
      }
      button {
        padding: 1rem 2rem;
        background-color: gray;
        color: black;
      }
    </style>

    <h2>Hello World</h2>

    <p>You have clicked the button <span id="times">0</span></p>

    <button
    type="button"
    onclick="buttonClick()"
    >
    Click meeeee
    </button>
    <script>
    function buttonClick(){
      let times = document.getElementById("times");
      console.log(times);
      let numberOfTimes = parseInt(times.innerHTML) + 1;
      times.innerHTML = numberOfTimes;
    }
    </script>
  </body>
</html>

Tutorials

Check out more on the official Mozzila website.

Also, you can check out the official Mozzila Tutorials.

You can also check W3schools website for JavaScript Tutorials.