Java script introduction

Java script is lightweight, interpreted, web scripting programming language.
javascript is also called dynamic programming language which is used to create dynamic web pages.
javascript support object-oriented paradigms.

How to write javascript code?

To write javascript code we require one code editor and web browsers to run javascript code.

Code Editors

Web browsers

  • Google chrome
  • Microsoft edge
  • Mozilla firefox
  • Opera
  • UC Browser and many more

The first program in javascript

There are two way to write js code and run code

  • Using <script> tag
  • Using a file with .js extension

Using <script> tag:

<title>Js code using script tag</title>
console.log(“welcome to javascript”);

Using file with .js extension

document.write(“Welcome to javascript”);

save this file as first.js

create new html file with extension .html as first.html

<script src=”first.js”></script>
© 2016 - 2022, All Rights are Reserved.