HOW TO WRITE JAVASCRIPT?
========================
Can write in three ways:
1) Internal JavaScript
2) External JavaScript
3) Using Command Prompt (Node JS)
1) Internal JavaScript
======================
==>
==> that can be limited to one specific html page.
==> can be applicable to single page applications.
Syntax:
Ex: 1)
Internal JavaScript
My First JS Program
Ex:2)
====
Internal JavaScript
My First JS Program
=================================================
2) External JavaScript
======================
==> can use for define the functionality to multiple web pages.
==> we need to create a javascript file (.js)
and write the code
==> that .js file we need to link to the website/application.
==>
script.js:
=========
var a = 100;
var b = 200;
var big;
if(a > b)
{
big = a;
}
else{
big = b;
}
document.write("The Biggest number = "+big);
file.html:
==========
Internal JavaScript
My First JS Program
===========================================
3) Using Command Prompt (Node JS)
=================================
==> we required to create the .js file and write the code here
==> In the command prompt:
$ node file-name.js
Requirement:
============
Node JS (Interpreter)
How to get the node js into any device:
=======================================