├── HTML Events.txt ├── Comparing all Different Types.txt ├── Displaying Dates.txt ├── JavaScript Date Output.txt ├── JavaScript NaN - Not a Number.txt ├── JavaScript Where To.txt ├── ISO Dates (Year and Month).txt ├── JavaScript Long Dates..txt ├── JavaScript Arrays.txt ├── JavaScript Short Dates..txt ├── Access the Full Array.txt ├── JavaScript Strings.txt ├── my first javaScript.txt ├── JavaScript Literals.txt ├── Math.sqrt().txt ├── Loop Scope.txt ├── Math.pow().txt ├── Math.abs().txt ├── Math.random().txt ├── Math.ceil().txt ├── Math.round().txt ├── NaN - Not a Number.txt ├── The if Statement.txt ├── JavaScript NEGATIVE_INFINITY.txt ├── JavaScript POSITIVE_INFINITY.txt ├── Comparison all Operators.txt ├── The console.log() Method.txt ├── JavaScript Numbers.txt ├── Math.floor().txt ├── The setDate() Method.txt ├── Hoisting.txt ├── JavaScript Declarations are Hoisted.txt ├── JavaScript While Loop.txt ├── Math.min() and Math.max().txt ├── javaScript The For Loop.txt ├── JavaScript Initializations are Not Hoisted.txt ├── Redeclaring Variables.txt ├── The Boolean() Function.txt ├── The length Property.txt ├── Associative Arrays.txt ├── The Concept of Data Types.txt ├── The setFullYear() Method.txt ├── new Date(dateString).txt ├── Arrays are Objects.txt ├── Displaying Object Properties.txt ├── JavaScript ForOf Loop.txt ├── The setSeconds() Method.txt ├── javascript Comparing For and While.txt ├── Everything Without a Value is False.txt ├── How to Recognize an Array.txt ├── JavaScript Random Integers.txt ├── The Number() Method Used on Dates.txt ├── Declaring Strict Mode.txt ├── JavaScript DoWhile Loop.txt ├── String Length.txt ├── Find the Highest (or Lowest) Array Value.txt ├── JavaScript Variables.txt ├── JavaScript in Head.txt ├── javascript Reference Error.txt ├── javascript Syntax Error.txt ├── javascript Type Error.txt ├── Date Input - Parsing Dates.txt ├── ISO Dates (Date-Time).txt ├── Stringify Arrays.txt ├── new Date(year, month, ...).txt ├── Number Properties Cannot be Used on Variables.txt ├── URI (Uniform Resource Identifier) Error.txt ├── Block Scope.txt ├── Changing an Array Element.txt ├── Waiting for a Timeout.txt ├── new Date(milliseconds).txt ├── JavaScript Loops.txt ├── Stringify Dates.txt ├── Arrow Function With Parameters.txt ├── JavaScript Functions.txt ├── javascript Range Error.txt ├── this in a Function (Default).txt ├── Displaying the Object in a Loop.txt ├── Stringify Functions.txt ├── Using the JavaScript Keyword new.txt ├── Arrow Functions Return Value by Default.txt ├── Converting Arrays.txt ├── JavaScript Error Handling.txt ├── Math.sin().txt ├── The valueOf() Method.txt ├── Using String search() With a String.txt ├── Automatic toString().txt ├── JavaScript Number Methods.txt ├── JavaScript all Type Conversion Table.txt ├── Math.cos().txt ├── Using Math.max() on an Array.txt ├── Global Scope.txt ├── javascript Converting Numbers to Strings.txt ├── Accessing the First Array Element.txt ├── Array.find().txt ├── Booleans Can be Objects.txt ├── Using String search() With a Regular Expression.txt ├── Finding a String in a String.txt ├── Logical all Operators.txt ├── Strict Comparison.txt ├── Accessing the Last Array Element.txt ├── Global JavaScript Variables.txt ├── Global Variables in HTML1.txt ├── Merging an Array with Values.txt ├── javascript The Break Statement.txt ├── Global Variables in HTML.txt ├── Array.findIndex().txt ├── Array.indexOf().txt ├── Arrow Function Without Parentheses.txt ├── Searching for a String in a String.txt ├── JavaScript ForIn Loop.txt ├── Array.lastIndexOf().txt ├── Compare Dates js array.txt ├── Automatically Global.txt ├── JavaScript Labels.txt ├── Array.forEach().txt ├── Slicing an Array.txt ├── The default Keyword.txt ├── Array.filter().txt ├── Merging (Concatenating) Arrays.txt ├── The Unary + Operator.txt ├── Function Scope.txt ├── Popping and Pushing array.txt ├── Array.reduce().txt ├── The parseFloat() Method.txt ├── Array.every().txt ├── Array.some().txt ├── Local JavaScript Variables.txt ├── The parseInt() Method.txt ├── calculation and then display.txt ├── Array.reduceRight().txt ├── Common Code Blocks.txt ├── JavaScript Statements.txt ├── javascript The Continue Statement.txt ├── javasript JavaScript Callbacks.txt ├── JavaScript Closures.txt ├── javascript Sequence Control.txt ├── Adding a Property.txt ├── Changing a Property Value.txt ├── Constant Arrays can Change.txt ├── Deleting Elements.txt ├── Sorting an Array.txt ├── The else Statement.txt ├── A Proper Random Function.txt ├── The getMonth() Method.txt ├── Adding Array Elements.txt ├── Numeric Sort.txt ├── javascript Function Sequence.txt ├── My Min Max JavaScript Methods.txt ├── The Light Bulb.txt ├── Looping Array Elements.txt ├── Don't Use new Object().txt ├── javascript A Counter Dilemma.txt ├── Listing Enumerable Properties.txt ├── The JavaScript apply() Method.txt ├── Using String replace() With a String.txt ├── JavaScript Function or Getter.txt ├── Listing All Properties.txt ├── Using splice() to Remove Elements.txt ├── Sorting an Array in Random Order.txt ├── The else if Statement.txt ├── Use String replace() With a Regular Expression.txt ├── The toExponential() Method.txt ├── Everything With a Value is True.txt ├── The Number() Method.txt ├── JavaScript constructor Property.txt ├── Math Properties (Constants).txt ├── Splicing an Array.txt ├── The apply() Method with Arguments.txt ├── Promise Object Properties.txt ├── The JavaScript Switch Statement.txt ├── The call() Method with Arguments.txt ├── The rangeOverflow Property.txt ├── JavaScript typeof Operator.txt ├── Adding Getters and Setters.txt ├── JavaScript Getter (The get Keyword).txt ├── Adding a Method to a Constructor.txt ├── JavaScript Setter (The set Keyword).txt ├── Reversing an Array.txt ├── JavaScript Static Methods.txt ├── The Fisher Yates Method.txt ├── The checkValidity() Method.txt ├── javascript Input Validation Example.txt ├── javascript Class Inheritance.txt ├── Finding HTML Elements Using document.forms.txt ├── javascript The finally Statement.txt ├── Object.defineProperty().txt ├── javascript A Counter Example.txt ├── Built-in JavaScript Constructors.txt ├── JavaScript Operators.txt └── README.md /HTML Events.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 |
9 |
10 |

Creater By Sanusanth

11 | Visit Sanusanth 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /Comparing all Different Types.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Comparison

6 | 7 |

8 | 9 | 12 |
13 |
14 |

Creater By Sanusanth

15 | Visit Sanusanth 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /Displaying Dates.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JavaScript Date Output.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JavaScript NaN - Not a Number.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Object Properties

6 | 7 |

8 | 9 | 12 |
13 |
14 |

Creater By Sanusanth

15 | Visit Sanusanth 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /JavaScript Where To.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

My First Web Page

6 |

My First Paragraph.

7 | 8 |

9 | 10 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /ISO Dates (Year and Month).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript ISO Dates

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JavaScript Long Dates..txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JavaScript Arrays.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /JavaScript Short Dates..txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Access the Full Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript Strings.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Strings

6 | 7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /my first javaScript.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

My First JavaScript

6 | 7 | 10 | 11 |

12 |
13 |
14 |

Creater By Sanusanth

15 | Visit Sanusanth 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /JavaScript Literals.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Numbers

6 | 7 |

Number can be written with or without decimals.

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Math.sqrt().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.sqrt()

6 | 7 |

Math.sqrt(x) returns the square root of x:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Loop Scope.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript let

6 | 7 |

8 | 9 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Math.pow().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.pow()

6 | 7 |

Math.pow(x,y) returns the value of x to the power of y:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Math.abs().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.abs()

6 | 7 |

Math.abs(x) returns the absolute (positive) value of x:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Math.random().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.random()

6 | 7 |

Math.random() returns a random number between 0 and 1:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Math.ceil().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.ceil()

6 | 7 |

Math.ceil() rounds a number up to its nearest integer:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Math.round().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.round()

6 | 7 |

Math.round(x) returns the value of x rounded to its nearest integer:

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /NaN - Not a Number.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Numbers

6 | 7 |

A number divided by a non-numeric string becomes NaN (Not a Number):

8 | 9 |

10 | 11 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /The if Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Display "Good day!" if the hour is less than 18:00:

6 | 7 |

Good Evening!

8 | 9 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /JavaScript NEGATIVE_INFINITY.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Object Properties

6 | 7 |

NEGATIVE_INFINITY

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript POSITIVE_INFINITY.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Object Properties

6 | 7 |

POSITIVE_INFINITY

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Comparison all Operators.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Comparison

6 | 7 |

Assign 5 to x, and display the value of the comparison (x == 8):

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /The console.log() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

My First Web Page

6 | 7 |

Activate debugging in your browser (Chrome, IE, Firefox) with F12, and select "Console" in the debugger menu.

8 | 9 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript Numbers.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Numbers

6 | 7 |

Numbers can be written with or without decimals:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Math.floor().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.floor()

6 | 7 |

Math.floor(x) returns the value of x (rounded strongdownstrong to its nearest integer)

8 | 9 |

10 | 11 | 14 |
15 |

16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /The setDate() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript setDate()

6 | 7 |

The setDate() method sets the day of a date object:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Hoisting.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Hoisting

6 | 7 |

With var, you can use a variable before it is declared:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /JavaScript Declarations are Hoisted.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript While Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript While Loop

6 | 7 |

8 | 9 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Math.min() and Math.max().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.min()

6 | 7 |

Math.min() returns the lowest value in a list of arguments:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /javaScript The For Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript For Loop

6 | 7 |

8 | 9 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /JavaScript Initializations are Not Hoisted.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Redeclaring Variables.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Declaring a Variable Using var

6 | 7 |

8 | 9 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /The Boolean() Function.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Display the value of Boolean(10 > 9):

6 | 7 | 8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /The length Property.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 |

The length property returns the length of an array.

7 | 8 |

9 | 10 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /Associative Arrays.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

8 | 9 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /The Concept of Data Types.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript

6 | 7 |

When adding a number and a string, JavaScript will treat the number as a string.

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /The setFullYear() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript setFullYear()

6 | 7 |

The setFullYear() method sets the year of a date object:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /new Date(dateString).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

A Date object can be created with a specified date and time:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Arrays are Objects.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Objects

6 |

JavaScript uses names to access object properties.

7 |

8 | 9 | 13 |
14 |
15 |

Creater By Sanusanth

16 | Visit Sanusanth 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Displaying Object Properties.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Display Object Properties

6 | 7 |

8 | 9 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /JavaScript ForOf Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript For/Of Loop

6 | 7 |

The for/of statement loops through the values of an iterable object.

8 | 9 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /The setSeconds() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript setSeconds()

6 | 7 |

The setSeconds() method sets the seconds of a date object (0-59):

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /javascript Comparing For and While.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Everything Without a Value is False.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Display the Boolean value of 0:

6 | 7 | 8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /How to Recognize an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

The typeof operator, when used on an array, returns object:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript Random Integers.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math

6 | 7 |

Math.floor(Math.random() * 10) returns a random integer between 0 and 9 (both 8 | included):

9 | 10 |

11 | 12 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /The Number() Method Used on Dates.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Global Methods

6 | 7 |

The Number() method can convert a date to a number:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Declaring Strict Mode.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

With "use strict":

6 |

Using a variable without declaring it, is not allowed.

7 | 8 |

Activate debugging in your browser (F12) to see the error report.

9 | 10 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /JavaScript DoWhile Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Do/While Loop

6 | 7 |

8 | 9 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /String Length.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript String Properties

6 | 7 |

The length property returns the length of a string:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Find the Highest (or Lowest) Array Value.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

The lowest number is .

8 | 9 | 14 |
15 |
16 |

Creater By Sanusanth

17 | Visit Sanusanth 18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript Variables.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Variables

6 | 7 |

In this example, x, y, and z are variables.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /JavaScript in Head.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 |

JavaScript in Head

13 | 14 |

A Paragraph.

15 | 16 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /javascript Reference Error.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Errors

6 | 7 |

You cannot use the value of a non-existing variable:

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /javascript Syntax Error.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Errors

6 | 7 |

You cannot evaluate code that contains a syntax error:

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /javascript Type Error.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Errors

6 | 7 |

You cannot convert a number to upper case:

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Date Input - Parsing Dates.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Date.parse()

6 | 7 |

Date.parse() returns the number of milliseconds between the date and January 1, 1970:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /ISO Dates (Date-Time).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript ISO Dates

6 | 7 |

Separate date and time with a capital T.

8 | 9 |

Indicate UTC time with a capital Z.

10 | 11 |

12 | 13 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Stringify Arrays.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Display Objects

6 | 7 |

JSON.stringify can stringify arrays:

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /new Date(year, month, ...).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

Using new Date(7 numbers), creates a new date object with the specified date and time:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Number Properties Cannot be Used on Variables.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Object Properties

6 | 7 |

Using a Number property on a variable, expression, or value, will return undefined:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /URI (Uniform Resource Identifier) Error.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Errors

6 | 7 |

Some characters cannot be decoded with decodeURI():

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Block Scope.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript let

6 | 7 |

Redeclaring a JavaScript variable with var is allowed anywhere in a program:

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Changing an Array Element.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

JavaScript array elements are accessed using numeric indexes (starting from 0).

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Waiting for a Timeout.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Callback

6 | 7 |

Wait 3 seconds (3000 milliseconds) for this page to change.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /new Date(milliseconds).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript new Date()

6 | 7 |

Using new Date(milliseconds), creates a new date object as January 1, 1970, 00:00:00 Universal Time (UTC) plus the milliseconds:

8 | 9 |

10 | 11 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript Loops.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript For Loop

6 | 7 |

8 | 9 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Stringify Dates.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Display Objects

6 | 7 |

JSON.stringify will convert dates into strings:

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Arrow Function With Parameters.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrow Function

6 | 7 |

This example shows an Arrow Function with a parameter.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /JavaScript Functions.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Functions

6 | 7 |

This example calls a function which performs a calculation, and returns the result:

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /javascript Range Error.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Errors

6 | 7 |

You cannot set the number of significant digits of a number to 500:

8 | 9 |

10 | 11 | 20 |
21 |

22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /this in a Function (Default).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The JavaScript this Keyword

6 | 7 |

In this example, this represents the object that "owns" myFunction:

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Displaying the Object in a Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Display Object Properties

6 | 7 |

8 | 9 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Stringify Functions.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Display Objects

6 | 7 |

JSON.stringify will not stringify functions:

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Using the JavaScript Keyword new.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Arrow Functions Return Value by Default.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrow Function

6 | 7 |

This example shows an Arrow Function without the brackets or the return keyword.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Converting Arrays.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

toString()

8 | 9 |

The toString() method returns an array as a comma separated string:

10 | 11 |

12 | 13 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /JavaScript Error Handling.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Error Handling

6 | 7 |

This example demonstrates how to use catch to diplay an error.

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Math.sin().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.sin()

6 | 7 |

Math.sin(x) returns the sin of x (given in radians):

8 |

Angle in radians = (angle in degrees) * PI / 180.

9 | 10 |

11 | 12 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /The valueOf() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Methods

6 | 7 |

The valueOf() method returns a number as a number:

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Using String search() With a String.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript String Methods

6 | 7 |

Search a string for "W3Schools", and display the position of the match:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Automatic toString().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

toString()

8 | 9 |

The toString() method returns an array as a comma separated string:

10 | 11 |

12 | 13 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /JavaScript Number Methods.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Methods

6 | 7 |

The toString() method converts a number to a string.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /JavaScript all Type Conversion Table.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Converting false to other types:

6 | 7 |

8 | 9 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Math.cos().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.cos()

6 | 7 |

Math.cos(x) returns the cosine of x (given in radians):

8 |

Angle in radians = (angle in degrees) * PI / 180.

9 | 10 |

11 | 12 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Using Math.max() on an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

The highest number is .

8 | 9 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Global Scope.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Scope

6 | 7 |

A GLOBAL variable can be accessed from any script or function.

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /javascript Converting Numbers to Strings.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The JavaScript String() Method

6 | 7 |

The String() method can convert a number to a string.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Accessing the First Array Element.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

JavaScript array elements are accesses using numeric indexes (starting from 0).

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Array.find().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.find()

6 | 7 |

8 | 9 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Booleans Can be Objects.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Never create booleans as objects.

6 |

Booleans and objects cannot be safely compared.

7 | 8 |

9 | 10 | 15 |
16 |
17 |

Creater By Sanusanth

18 | Visit Sanusanth 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Using String search() With a Regular Expression.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Regular Expressions

6 | 7 |

Search a string for "w3Schools", and display the position of the match:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Finding a String in a String.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript String Methods

6 | 7 |

The indexOf() method returns the position of the first occurrence of a specified text:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Logical all Operators.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Comparison

6 | 7 |

The AND operator (&&) returns true if both expressions are true, otherwise it returns false.

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Strict Comparison.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript switch

6 | 7 |

8 | 9 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /Accessing the Last Array Element.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

JavaScript array elements are accesses using numeric indexes (starting from 0).

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Global JavaScript Variables.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Scope

6 | 7 |

A GLOBAL variable can be accessed from any script or function.

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Global Variables in HTML1.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Global Variables

6 | 7 |

In HTML, global variables defined with var, will become window variables.

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Merging an Array with Values.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

concat()

8 | 9 |

The concat() method can also merge string values to arrays:

10 | 11 |

12 | 13 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /javascript The Break Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Loops

6 | 7 |

A loop with a break statement.

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Global Variables in HTML.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Scope

6 | 7 |

In HTML, global variables defined with var, will become window variables.

8 | 9 |

10 | 11 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Array.findIndex().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.findIndex()

6 | 7 |

8 | 9 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /Array.indexOf().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.indexOf()

6 | 7 | 8 |

9 | 10 | 15 | 16 |

The indexOf() does not work in Internet Explorer 8 and earlier versions.

17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Arrow Function Without Parentheses.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrow Function

6 | 7 |

This example shows that if you have only one parameter in an Arrow Function, you can skip the parentheses.

8 | 9 |

10 | 11 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Searching for a String in a String.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript String Methods

6 | 7 |

The search() method returns the position of the first occurrence of a specified text in a string:

8 | 9 |

10 | 11 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /JavaScript ForIn Loop.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript For/In Loop

6 | 7 |

The for/in statement loops through the properties of an object.

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Array.lastIndexOf().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.lastIndexOf()

6 | 7 | 8 |

9 | 10 | 15 | 16 |

The lastIndexOf() does not work in Internet Explorer 8 and earlier versions.

17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /Compare Dates js array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Automatically Global.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

If you assign a value to a variable that has not been declared, it will automatically become a GLOBAL variable:

6 | 7 |

8 | 9 | 17 |
18 |
19 |

Creater By Sanusanth

20 | Visit Sanusanth 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /JavaScript Labels.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript break

6 | 7 |

8 | 9 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Array.forEach().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.forEach()

6 | 7 |

Calls a function once for each array element.

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Slicing an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

slice()

8 | 9 |

This example slices out a part of an array starting from array element 1 ("Orange"):

10 | 11 |

12 | 13 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /The default Keyword.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript switch

6 | 7 |

8 | 9 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Array.filter().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.filter()

6 | 7 |

Creates a new array with all array elements that passes a test.

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Merging (Concatenating) Arrays.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

concat()

8 | 9 |

The concat() method is used to merge (concatenate) arrays:

10 | 11 |

12 | 13 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /The Unary + Operator.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The JavaScript typeof Operator

6 | 7 |

The typeof operator returns the type of a variable or expression.

8 | 9 | 10 | 11 |

12 | 13 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Function Scope.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Scope

6 | 7 |

Outside myFunction() carName is undefined.

8 | 9 |

10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /Popping and Pushing array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

pop()

8 | 9 |

The pop() method removes the last element from an array.

10 | 11 |

12 |

13 | 14 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Array.reduce().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.reduce()

6 | 7 |

This example finds the sum of all numbers in an array:

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /The parseFloat() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Global Methods

6 | 7 |

The parseFloat() method converts strings to numbers:

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Array.every().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.every()

6 | 7 |

The every() method checks if all array values pass a test.

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Array.some().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.some()

6 | 7 |

The some() method checks if some array values pass a test.

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Local JavaScript Variables.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Scope

6 | 7 |

Outside myFunction() carName is undefined.

8 | 9 |

10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /The parseInt() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Global Functions

6 | 7 |

The global JavaScript function parseInt() converts strings to numbers:

8 | 9 |

10 | 11 | 19 |
20 |
21 |

Creater By Sanusanth

22 | Visit Sanusanth 23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /calculation and then display.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Callbacks

6 | 7 |

Do a calculation and then display the result.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Array.reduceRight().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array.reduceRight()

6 | 7 |

This example finds the sum of all numbers in an array:

8 | 9 |

10 | 11 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Common Code Blocks.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript switch

6 | 7 |

8 | 9 | 25 |
26 |
27 |

Creater By Sanusanth

28 | Visit Sanusanth 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /JavaScript Statements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Statements

6 | 7 |

A JavaScript program is a list of statements to be executed by a computer.

8 | 9 |

10 | 11 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /javascript The Continue Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Loops

6 | 7 |

A loop with a continue statement.

8 | 9 |

A loop which will skip the step where i = 3.

10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /javasript JavaScript Callbacks.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Callbacks

6 | 7 |

Do a calculation and then display the result.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /JavaScript Closures.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Closures

6 | 7 |

Counting with a local variable.

8 | 9 | 10 | 11 |

0

12 | 13 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /javascript Sequence Control.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Functions

6 | 7 |

Do a calculation and then display the result.

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /Adding a Property.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object.defineProperty()

6 | 7 |

This example adds a new property to an object.

8 | 9 |

10 | 11 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /Changing a Property Value.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object.defineProperty()

6 | 7 |

This example changes a property value.

8 | 9 |

10 | 11 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /Constant Arrays can Change.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript const

6 | 7 |

Declaring a constant array does NOT make the elements unchangeble:

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /Deleting Elements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

Deleting elements leaves undefined holes in an array.

8 | 9 |

10 |

11 | 12 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Sorting an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

The sort() method sorts an array alphabetically.

8 | 9 | 10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /The else Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Click the button to display a time-based greeting:

6 | 7 | 8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /A Proper Random Function.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math.random()

6 | 7 |

Every time you click the button, getRndInteger(min, max) returns a random number between 0 8 | and 9 (both included):

9 | 10 | 11 | 12 |

13 | 14 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /The getMonth() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript getMonth()

6 | 7 |

The getMonth() method returns the month as a number:

8 | 9 |

You can use an array to display the name of the month:

10 | 11 |

12 | 13 | 18 |
19 |
20 |

Creater By Sanusanth

21 | Visit Sanusanth 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /Adding Array Elements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

The push method appends a new element to an array.

8 | 9 | 10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Numeric Sort.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

Click the button to sort the array in ascending order.

8 | 9 | 10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /javascript Function Sequence.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Function Sequence

6 | 7 |

JavaScript functions are executed in the sequence they are called.

8 | 9 |

10 | 11 | 27 |
28 |
29 |

Creater By Sanusanth

30 | Visit Sanusanth 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /My Min Max JavaScript Methods.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

The highest number is .

8 | 9 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /The Light Bulb.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

What Can JavaScript Do?

6 | 7 |

JavaScript can change HTML attribute values.

8 | 9 |

In this case JavaScript changes the value of the src (source) attribute of an image.

10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

Creater By Sanusanth

19 | Visit Sanusanth 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /Looping Array Elements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Arrays

6 | 7 |

The best way to loop through an array is using a standard for loop:

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /Don't Use new Object().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 25 |
26 |
27 |

Creater By Sanusanth

28 | Visit Sanusanth 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /javascript A Counter Dilemma.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Function Closures

6 | 7 |

Counting with a global variable.

8 | 9 |

10 | 11 | 28 |
29 |
30 |

Creater By Sanusanth

31 | Visit Sanusanth 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /Listing Enumerable Properties.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object.keys()

6 | 7 |

This example list the enumerable properties of an object.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /The JavaScript apply() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Functions

6 |

In this example the fulllName method of person is applied on person1:

7 | 8 |

9 | 10 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Using String replace() With a String.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

JavaScript String Methods

7 | 8 |

Replace "Microsoft" with "W3Schools" in the paragraph below:

9 | 10 | 11 | 12 |

Please visit Microsoft!

13 | 14 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /JavaScript Function or Getter.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object Method

6 | 7 |

Object data can be accessed using property stored as a function.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Listing All Properties.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object.getOwnPropertyNames()

6 | 7 |

This example list the properties of an object.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Using splice() to Remove Elements.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

splice()

8 | 9 |

The splice() methods can be used to remove array elements.

10 | 11 | 12 | 13 |

14 | 15 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /Sorting an Array in Random Order.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

Click the button (again and again) to sort the array in random order.

8 | 9 | 10 | 11 |

12 | 13 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /The else if Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Click the button to get a time-based greeting:

6 | 7 | 8 | 9 |

10 | 11 | 25 |
26 |
27 |

Creater By Sanusanth

28 | Visit Sanusanth 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /Use String replace() With a Regular Expression.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Regular Expressions

6 | 7 |

Replace "microsoft" with "W3Schools" in the paragraph below:

8 | 9 | 10 | 11 |

Please visit Microsoft and Microsoft!

12 | 13 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /The toExponential() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Number Methods

6 | 7 |

The toExponential() method returns a string, with the number rounded and written using exponential notation.

8 | 9 |

An optional parameter defines the number of digits behind the decimal point.

10 | 11 |

12 | 13 | 21 |
22 |
23 |

Creater By Sanusanth

24 | Visit Sanusanth 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /Everything With a Value is True.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /The Number() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Global Methods

6 | 7 |

The Number() method converts variables to numbers:

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /JavaScript constructor Property.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The JavaScript constructor Property

6 | 7 |

The constructor property returns the constructor function for a variable or an 8 | object.

9 | 10 |

11 | 12 | 22 |
23 |
24 |

Creater By Sanusanth

25 | Visit Sanusanth 26 |
27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Math Properties (Constants).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Math Constants

6 | 7 |

8 | 9 | 20 |
21 |
22 |

Creater By Sanusanth

23 | Visit Sanusanth 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Splicing an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Methods

6 | 7 |

splice()

8 | 9 |

The splice() method adds new elements to an array.

10 | 11 | 12 | 13 |

14 |

15 | 16 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /The apply() Method with Arguments.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Functions

6 | 7 |

In this example the fulllName method of person is applied on person1:

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Promise Object Properties.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Promise

6 | 7 |

8 | 9 | 31 |
32 |
33 |

Creater By Sanusanth

34 | Visit Sanusanth 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /The JavaScript Switch Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 33 |
34 |
35 |

Creater By Sanusanth

36 | Visit Sanusanth 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /The call() Method with Arguments.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Functions

6 |

This example calls the fullName method of person, using it on person1: 7 |

8 | 9 |

10 | 11 | 28 |
29 |
30 |

Creater By Sanusanth

31 | Visit Sanusanth 32 |
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /The rangeOverflow Property.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Enter a number and click OK:

6 | 7 | 8 | 9 | 10 |

If the number is greater than 100 (the input's max attribute), an error message will be displayed.

11 | 12 |

13 | 14 | 25 |
26 |
27 |

Creater By Sanusanth

28 | Visit Sanusanth 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /JavaScript typeof Operator.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The JavaScript typeof Operator

6 | 7 |

The typeof operator returns the type of a variable, object, function or expression.

8 | 9 |

10 | 11 | 24 |
25 |
26 |

Creater By Sanusanth

27 | Visit Sanusanth 28 |
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Adding Getters and Setters.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object.defineProperty()

6 | 7 |

This example uses the defineProperty() method to add a getter and a setter.

8 | 9 |

10 | 11 | 23 |
24 |
25 |

Creater By Sanusanth

26 | Visit Sanusanth 27 | Visit Sanusanth 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /JavaScript Getter (The get Keyword).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Getters and Setters

6 | 7 |

Getters and setters allow you to get and set properties via methods.

8 | 9 |

This example uses a lang property to get the value of the language property.

10 | 11 |

12 | 13 | 26 |
27 |
28 |

Creater By Sanusanth

29 | Visit Sanusanth 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /Adding a Method to a Constructor.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object Constructors

6 | 7 |

8 | 9 | 30 |
31 |
32 |

Creater By Sanusanth

33 | Visit Sanusanth 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /JavaScript Setter (The set Keyword).txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Getters and Setters

6 | 7 |

Getters and setters allow you to get and set properties via methods.

8 | 9 |

This example uses a lang property to set the value of the language property.

10 | 11 |

12 | 13 | 28 |
29 |
30 |

Creater By Sanusanth

31 | Visit Sanusanth 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /Reversing an Array.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort Reverse

6 | 7 |

The reverse() method reverses the elements in an array.

8 |

By combining sort() and reverse() you can sort an array in descending order.

9 | 10 | 11 |

12 | 13 | 26 |
27 |
28 |

Creater By Sanusanth

29 | Visit Sanusanth 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /JavaScript Static Methods.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Class Static Methods

6 | 7 |

A static method is created with the "static" keyword, and you can only call the method on the class itself.

8 | 9 |

10 | 11 | 30 |
31 |
32 |

Creater By Sanusanth

33 | Visit Sanusanth 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /The Fisher Yates Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Array Sort

6 | 7 |

The Fisher Yates Method

8 | 9 |

Click the button (again and again) to sort the array in random order.

10 | 11 | 12 | 13 |

14 | 15 | 30 |
31 |
32 |

Creater By Sanusanth

33 | Visit Sanusanth 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /The checkValidity() Method.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Enter a number and click OK:

6 | 7 | 8 | 9 | 10 |

If the number is less than 100 or greater than 300, an error message will be displayed.

11 | 12 |

13 |
14 |
15 |

Creater By Sanusanth

16 |
17 | 27 |
28 |
29 |

Creater By Sanusanth

30 | Visit Sanusanth 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /javascript Input Validation Example.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Please input a number between 5 and 10:

6 | 7 | 8 | 9 |

10 | 11 | 29 |
30 |
31 |

Creater By Sanusanth

32 | Visit Sanusanth 33 |
34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /javascript Class Inheritance.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Class Inheritance

6 | 7 |

Use the "extends" keyword to inherit all methods from another class.

8 |

Use the "super" method to call the parent's constructor function.

9 | 10 |

11 | 12 | 35 |
36 |
37 |

Creater By Sanusanth

38 | Visit Sanusanth 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /Finding HTML Elements Using document.forms.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Finding HTML Elements Using document.forms

6 | 7 |
8 | First name:
9 | Last name:

10 | 11 |
12 | 13 |

Click "Try it" to display the value of each element in the form.

14 | 15 | 16 | 17 |

18 | 19 | 30 |
31 |
32 |

Creater By Sanusanth

33 | Visit Sanusanth 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /javascript The finally Statement.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Please input a number between 5 and 10:

6 | 7 | 8 | 9 | 10 |

11 | 12 | 33 |
34 |
35 |

Creater By Sanusanth

36 | Visit Sanusanth 37 |
38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Object.defineProperty().txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Getters and Setters

6 | 7 |

Perfect for creating counters:

8 | 9 |

10 | 11 | 40 |
41 |
42 |

Creater By Sanusanth

43 | Visit Sanusanth 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /javascript A Counter Example.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Getters and Setters

6 | 7 |

Perfect for creating counters:

8 | 9 |

10 | 11 | 40 |
41 |
42 |

Creater By Sanusanth

43 | Visit Sanusanth 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /Built-in JavaScript Constructors.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Object Constructors

6 | 7 |

8 | 9 | 30 | 31 |

There is no need to use String(), Number(), Boolean(), Array(), and RegExp()

32 | 33 |

Read the JavaScript.

34 |
35 |
36 |

Creater By Sanusanth

37 | Visit Sanusanth 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /JavaScript Operators.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

JavaScript Operators

6 | 7 |

x = 5, y = 2, calculate z = x + y, and display z:

8 | 9 |

10 | 11 | 17 | 18 | 62 | 63 |
64 |
65 |

Creater By Sanusanth

66 | Visit Sanusanth 67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # javascript-basic-program 2 | What is JavaScript and what does it do? 3 | Before you start learning something new, it’s important to understand exactly what it is and what it does. This is especially useful when it comes to mastering a new programming language. 4 | 5 | In simple terms, JavaScript is a programming language used to make websites interactive. If you think about the basic makeup of a website, you have HTML, which describes and defines the basic content and structure of the website, then you have CSS, which tells the browser how this HTML content should be displayed—determining things like color and font. With just HTML and CSS, you have a website that looks good but doesn’t actually do much. JavaScript brings the website to life by adding functionality. JavaScript is responsible for elements that the user can interact with, such as drop-down menus, modal windows, and contact forms. It is also used to create things like animations, video players, and interactive maps. 6 | 7 | Nowadays, JavaScript is an all-purpose programming language—meaning it runs across the entire software stack. The most popular application of JavaScript is on the client side (aka frontend), but since Node.js came on the scene, many people run JavaScript on the server side (aka backend) as well. When used on the client side, JavaScript code is read, interpreted, and executed in the user’s web browser. When used on the server side, it is run on a remote computer. You can learn more about the difference between frontend and backend programming here. 8 | 9 | JavaScript isn’t only used to create websites. It can also be used to build browser-based games and, with the help of certain frameworks, mobile apps for different operating systems. The creation of new libraries and frameworks is also making it possible to build backend programs with JavaScript, such as web apps and server apps. 10 | 11 | Is it still worth learning JavaScript in 2021? The world of web development is constantly moving. With so many new tools popping up all the time, it can be extremely difficult to know where you should focus your efforts. As an aspiring developer, you’ll want to make sure that what you’re learning is still relevant in today’s industry. If you’re having doubts about JavaScript, it’s important to know that, since its creation in 1995, JavaScript is pretty much everywhere on the web—and that’s not likely to change any time soon. According to the 2020 StackOverflow developer survey, JavaScript is the most commonly used programming language for the eighth year in a row. It is currently used by 94.5% of all websites and, despite originally being designed as a client-side language, JavaScript has now made its way to the server-side of websites (thanks to Node.js), mobile devices (thanks to React Native and Ionic) and desktop (courtesy of Electron). 12 | 13 | As long as people are interacting with the web, you can assume that JavaScript is highly relevant—there’s no doubt that this is a language worth knowing! With that in mind, let’s look at some of the key benefits of becoming a JavaScript expert. 14 | 15 | Why learn JavaScript? 16 | 17 | The most obvious reason for learning JavaScript is if you have hopes of becoming a web developer. Even if you haven’t got your heart set on a tech career, being proficient in JavaScript will enable you to build websites from scratch—a pretty useful skill to have in today’s job market! 18 | 19 | If you do want to become a web developer, here are some of the main reasons why you should learn JavaScript: 20 | 21 | JavaScript experts are versatile 22 | 23 | JavaScript is an extremely versatile language. Once you’ve mastered it, the possibilities are endless: you can code on the client-side (frontend) using Angular and on the server-side (backend) using Node.js. You can also develop web, mobile, and desktop apps using React, React Native, and Electron, and you can even get involved in machine learning. 24 | 25 | If you want to become a frontend developer, JavaScript is a prerequisite. However, that’s not the only career path open to you as a JavaScript expert. Mastering this key programming language could see you go on to work in full-stack development, games development, information security software engineering, machine learning, and artificial intelligence—to name just a few! 26 | 27 | Ultimately, if you want any kind of development or engineering career, proficiency in JavaScript is a must. 28 | 29 | JavaScript experts are in-demand (and well-paid) JavaScript is the most popular programming language in the world, so it’s no wonder that JavaScript is one of the most sought-after skills in the web development industry today. 30 | 31 | According to the Devskiller IT Skills and Hiring Report 2020, 72% of companies are looking to hire JavaScript experts. Enter the search term “JavaScript” on job site Indeed and you’ll find over 40,000 jobs requiring this skill (in the US). Run the same search on LinkedIn and the results are in excess of 125,000. 32 | 33 | At the same time, the global demand for JavaScript seems to outweigh the expertise available on the market. According to this 2018 HackerRank report, 48% of employers worldwide need developers with JavaScript skills, while only 42% of student developers claim to be proficient in JavaScript. And, in their most recent report for 2020, HackerRank once again reports that JavaScript is the most popular language that hiring mangers look for in a web developer candidate. 34 | 35 | Not only are JavaScript experts in demand—they are also well-paid. In the United States, JavaScript developers earn an average yearly salary of $111,953 per year. We’ve covered this topic in more detail in our JavaScript salary guide, but as you can see, learning JavaScript can really boost your earning potential as a developer. 36 | 37 | JavaScript is beginner-friendly 38 | 39 | Compared to many other programming languages, JavaScript offers one of the more beginner-friendly entry points into the world of coding. The great thing about JavaScript is that it comes installed on every modern web browser—there’s no need to set up any kind of development environment, which means you can start coding with JavaScript right away! 40 | 41 | Another advantage of learning JavaScript as your first programming language is that you get instant feedback; with a minimal amount of JavaScript code, you’ll immediately see visible results. There’s also a huge JavaScript community on sites like Stack Overflow, so you’ll find plenty of support as you learn. 42 | 43 | Not only is JavaScript beginner-friendly; it will also set you up with some extremely valuable transferable skills. JavaScript supports object-oriented, functional, and imperative styles of programming—skills which can be transferred to any new language you might learn later on, such as Python, Java, or C++. JavaScript provides a crucial introduction to key principles and practices that you’ll take with you throughout your career as a developer. 44 | 45 | Should you learn plain JavaScript first or can you skip to frameworks and libraries? When deciding whether or not to learn JavaScript, what you’re really asking is whether or not you should learn “vanilla” JavaScript. Vanilla JavaScript just means plain JavaScript without any libraries or frameworks. Let’s explore what this means in more detail now. 46 | 47 | What is meant by vanilla JavaScript, libraries, and frameworks? 48 | 49 | If you research the term “vanilla JavaScript”, you might run into some confusion; however, all you need to know is that vanilla JavaScript is used to refer to native, standards-based, non-extended JavaScript. There is no difference between vanilla JavaScript and JavaScript—it’s just there to emphasize the usage of plain JavaScript without the use of libraries and frameworks. 50 | 51 | So what are libraries and frameworks? 52 | 53 | JavaScript libraries and frameworks both contain sets of prewritten, ready-to-use JavaScript code—but they’re not the same thing. You can think of a framework as your blueprint for building a website: it gives you a structure to work from, and contains ready-made components and tools that help you to build certain elements much quicker than if you were to code them from scratch. Some popular JavaScript frameworks include Angular, React, Vue, and Node.js. 54 | 55 | Frameworks also contain libraries. Libraries are smaller than frameworks, and tend to be used for more specific cases. A JavaScript library contains sets of JavaScript code which can be called upon to implement certain functions and features. Let’s imagine you want to code a particular element into your website. You could write, say, ten lines of JavaScript from scratch—or you could take the condensed, ready-made version from your chosen JavaScript library. Some examples of JavaScript libraries include jQuery, Lodash, and Underscore. 56 | 57 | The easiest way to understand how frameworks and libraries work together is to imagine you are building a house. The framework provides the foundation and the structure, while the library enables you to add in ready-made components (like furniture) rather than building your own from scratch. 58 | 59 | You can learn more about the relationship between languages and libraries in this post explaining the main differences between JavaScript and jQuery. For now, let’s go back to our original question: How important is it to learn vanilla JavaScript? 60 | 61 | Should you learn vanilla JavaScript first? 62 | 63 | When it comes to learning JavaScript, it can be tempting to skip ahead to those time-saving frameworks and libraries we just talked about—and many developers do. However, there are many compelling arguments for learning plain JavaScript first. 64 | 65 | While JavaScript frameworks may help you get the job done quicker, there’s only so far you can go if you don’t understand the core concepts behind these frameworks. Frontend developer Abhishek Nagekar describes how not learning vanilla JavaScript came back to bite him when he started learning the JavaScript frameworks Node and Express: 66 | 67 | “As I went to write more and more code in Node and Express, I began to get stuck at even the tiniest problems. Suddenly, I was surrounded with words like callbacks, closures, event loop and prototype. It felt like I got a reintroduction to JavaScript, but this time, it was not a toddler playing in its cradle, it was something of a mysterious monster, challenging me on every other step for not having taken it seriously.” 68 | 69 | The above Tweet references a long-running joke within the developer community, and although it dates way back to 2015, it’s still highly relevant today. If you want to become a developer who can innovate, not just execute, you need to understand the underlying principles of the web—not just the shortcuts. This means learning vanilla JavaScript before you move on to frameworks. In fact, understanding plain JavaScript will help you later on when it comes to deciding whether to use a framework for a certain project, and if so, which framework to use. 70 | 71 | Why Study JavaScript? 72 | 73 | JavaScript is one of the 3 languages all web developers must learn: 74 | 1. HTML to define the content of web pages 75 | 2. CSS to specify the layout of web pages 76 | 3. JavaScript to program the behavior of web pages 77 | 78 | Learning Speed 79 | 80 | In this tutorial, the learning speed is your choice. 81 | Everything is up to you. 82 | If you are struggling, take a break, or re-read the material. 83 | Always make sure you understand all the "Try-it-Yourself" examples. 84 | The only way to become a clever programmer is to: Practice. Practice. Practice. Code. Code. Code 85 | ! Commonly Asked Questions How do I get JavaScript? 86 | Where can I download JavaScript? 87 | Is JavaScript Free? You don't have to get or download JavaScript. 88 | JavaScript is already running in your browser on your computer, on your tablet, and on your smart-phone. 89 | JavaScript is free to use for everyone. 90 | --------------------------------------------------------------------------------