Page 2 :
Program Name :Information Technology, Program Code: IF, Semester: Fifth, Course Title: Client Side Scripting Language, Course Code: 22519
Page 3 :
Vision – Mission of Department, Department Vision, To excel in Information Technology engineering education to produce professionally competent engineers with lifelong learning attitude for the accomplishment of ever-growing needs of society and industry., , Department Mission, To provide quality education through effective teaching learning methodologies with stimulating environment for preparing technical and professional competent engineers., To build up professional skills in students that will help them to succeed and progress in their personal and professional career. , To imbibe professional ethics and social responsibilities in students for society and environment
Page 4 :
Course Outcomes, Create interactive web pages using program flow control structure, Implement arrays and functions in JavaScript, Create event based web forms using JavaScript, Use JavaScript for handling cookies, Create interactive webpage using regular expressions for validations, Create menus and navigations in web Pages
Page 5 :
JavaScript???, JavaScript is a object-based scripting language and it is light weighted. , It is first implemented by Netscape (with help from Sun Microsystems). , JavaScript was created by Brendan Eich at Netscape in 1995 for the purpose of allowing code in web-pages (performing logical operation on client side).
Page 6 :
There are too many web applications running on the web that are using JavaScript technology like gmail, facebook,twitter, google map, youtube etc., Uses of Javascript
Page 7 :
Why we Use JavaScript?, Using HTML we can only design a web page but you can not run any logic on web browser like addition of two numbers, check any condition, looping statements (for, while), decision making statement (if-else) at client side. All these are not possible using HTML So for perform all these task at client side you need to use JavaScript.
Page 8 :
UNIT NO.I, Basics of JavaScript Programming
Page 9 :
OUTLINE, What is HTML?, Basic concepts of HTML., Difference between Java and JavaScript., What is JavaScript Programming?, Features of JavaScript Programming., How to write JavaScript.
Page 10 :
HTML is a Hypertext Markup Language., It is standard Markup Language for creating web pages., HTML describes the structure of web page ., What is html?
Page 11 :
HTML STRUCTURE
Page 12 :
HTML TAG
Page 13 :
HTML Elements, The HTML element is everything from the start tag to the end tag:, <tag name>Content goes here...</tag name> , Example:, 1.<h1>My First Heading</h1> , 2.<p>My first paragraph.</p>
Page 15 :
HTML Elements
Page 16 :
HTML Attributes, All HTML elements can have attributes ., Attributes provide additional information about elements., Attributes are always specified in the start tag, Attributes usually come in name/value pairs like: name="value", The href Attribute, The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:, Example, <a href="https://www.w3schools.com">Visit W3Schools</a>
Page 18 :
Examples of HTML
Page 19 :
Difference between java and JavaScript.
Page 20 :
JavaScript is a dynamic computer programming language .when JavaScript is applied with an HTML document ,it can provide dynamic interactivity on website., , JavaScript is, Popular, Lightweight, Open source client side language, What is JavaScript?
Page 21 :
1.4, Features of JavaScript, Q.Enlist Features of JavaScript ., , JavaScript is an Object-Based Scripting Language, JavaScript is Case-sensitive, It is Light weighted language, It handling dates and time, JavaScript is interpreter based scripting language, Every statements in JavaScript must be terminated with semicolon(;), An important part in JavaScript is the ability to create new functions within scripts.
Page 22 :
How to Write JavaScript ?, Q.Explain <script>tag with example, JavaScript is implemented by adding<script>……</script> tag within HTML tag in a web page, Script tag can be inserted within webpage by following ways:, Script in <head>section:, <head>, <script> , //JavaScript code, </script>, </head>
Page 23 :
ConTD.., Script in <body> section:, <body>, <script> , //JavaScript code, </script>, </body>
Page 24 :
ConTD…, <script> tag has following attributes:, Language:-The language attribute is set to value “JavaScript”., Type:-The type attribute tells the browser that the script is in plain text and the text is organized in the format of a JavaScript., <script language=“JavaScript", type= “text/javascript”>, document. write(“hello”), </script>
Page 25 :
Object NAME, Q.Explain the term -:i .Object Name ii. Method iii. Property iv.Event, , i. Object Name: , A JavaScript object is a collection of named values and these named values are properties of object., A web page contains various objects; some of them are of same type whereas some of them are of different type of object., Each object should be uniquely identified by a name or Ids in web page to distinguished between them., JavaScript supports various objects like document,form,button,window etc.
Page 26 :
Con.., Example:, In real life ,a car is an object. A car has properties like weight and color and methods like start and stop., Accessing object properties:, ObjectName.PropertyName, OR, ObjectName[“PropertyName”] E.g.car.name;
Page 27 :
Property, Property is a value associated with an object, Every object has its own set of properties for example window has properties like width,height,backgroundcolor etc., A property is a”key:value”pair., Key (property name), value (property value), Firstname=“aman”, Lastname=“patvegar”
Page 28 :
method, Method is a set of instructions performed by an object when it receives a message., Methods are stored in properties as function definitions., , , Accessing object method:, , Syntax:, Objectname.methodname(), , E.g., Name=person.fullname()
Page 29 :
Dot syntax, Objects are being associated with certain kind of information(proper ties)and certain kind of behaviours(method), We can access an object’s properties and method by using the dot syntax along with the object name and it’s property or method, , For example:, Document is an object ,backgroundcolor is a property and write is a method of document object., document.backgroundcolor;, document. write()
Page 30 :
Main Event, In JavaScript ,an event is the way to start executing your code like on mouse click, button click etc., JavaScript reacts to events with the help of event handling.
Page 31 :
Comment is nothing but it is a statement which is not display on browser window. , It is useful to understand the which code is written for what purpose., , Types of JavaScript Comments, There are two types of comments are in JavaScript, , Single-line Comment, Multi-line Comment, Comment
Page 32 :
Single-line Comment:-, It is represented by double forward slashes //. , To create a single line comment in JavaScript, you place two slashes "//" in front of the code or text , A comment is a single or multiple lines, which give some information about the current program. Comments are not for execution. , Write comment after double slashes // and write multiple lines of comments between/* and */, , Example JavaScript Comment, <script>, // It is single line comment , document. write("Hello JavaScript"); , </script> , Result, Hello JavaScript
Page 33 :
2.Multi-line Comment:-, It can be used to add single as well as multi line comments., For large comments you can use JavaScript's multi-line comment., It is represented by forward slash / with asterisk * then *asterisk with forward slash /., , Example JavaScript Comment, <script> , /* It is multi line comment. It will not be displayed */ , document. write("Javascript multiline comment");, </script>, Keywords
Page 35 :
Some Important Point in Javascript, 1.Character Set, JavaScript uses the Unicode character set and so allows almost all characters, punctuations, and symbols., 2.Case Sensitive, JavaScript is a case sensitive scripting language. , It means functions, variables and keywords are case sensitive. , For example, VAR is different from var, John is not equal to john., 3.String, String is a text in JavaScript. , A text content must be enclosed in double or single quotation marks., Example: string, <script> "Hello World" //JavaScript string in double quotes, 'Hello World' //JavaScript string in single quotes , </script>
Page 36 :
4.Number, JavaScript allows you to work with any kind of numbers like integer, float, hexadecimal etc. , Number must NOT be wrapped in quotation marks., Example: Integer: 1000, Float: 10.2, 5.Boolean, As in other languages, JavaScript also includes true or false as a boolean value., 6.Semicolon, JavaScript statements are separated by a semicolon., Add a semicolon at the end of each executable statement, It is not mandatory to end every statement with a semicolon but it is recommended.
Page 37 :
Example: , var a, b, c; // Declare 3 variablesa = 5; // Assign the value 5 to ab = 6; // Assign the value 6 to bc = a + b; // Assign the sum of a and b to c, Example:, document. write(“hi”), Ending statements with semicolon is not required, but highly recommended., 7.White space, JavaScript ignores multiple spaces and tabs., You can add white space to your script to make it more readable. , Example: JavaScript ignores whitespaces, var one =1; var one = 1; var one = 1;
Page 38 :
Values and Variables, JavaScript is a dynamic language or loosely - typed language because a variable can hold value of any data type at any point of time., var keyword is used to specify the data type., It can hold any type of values such as numbers,strings etc., Following are the values used by JavaScript., Number:, e.g.var a=20;, String:, e.g.var city=“Ichalkaranji”, Boolean:, e.g. var b=true;, Null:, var i=null;, Objects: var person={firstName:”abc”,lastName:”xyz”};
Page 39 :
Variables, Variable means anything that can vary. JavaScript includes variables which hold the data value and it can be changed anytime. , JavaScript variables are containers for storing data values. , A variable must have a unique name. You can assign a value to a variable using equal to (=) operator when you declare it or before using it., JavaScript is untyped language. This means that a JavaScript variable can hold a value of any data type. Unlike many other languages, you don't have to tell JavaScript during variable declaration what type of value the variable will hold. The value type of a variable can change during the execution of a program and JavaScript takes care of it automatically.
Page 40 :
Declaring Variables, To create a variable requires two parts:, Special word ,called keyword. The word you need to use to declare a variable var., Variable name can consist of any letter, digit and underscore, but it can’t begin with a digit., Before use a variable in JavaScript program, you must declare it. Variables are declared with var keyword., Syntax: , var <variable-name>; , <script type=“text/javascript”>, var money;, var name; </script>, You can also declare multiple variables with var keyword, var money,name;
Page 41 :
JavaScript Identifiers, All JavaScript variables must be identified with unique names., These unique names are called identifiers., Identifiers can be short names (like x and y) or more descriptive names (age, sum)., The general rules for constructing names for variables (unique identifiers) are:, Names can contain letters, digits, underscores, and dollar signs., Names must begin with a letter., Names are case sensitive (y and Y are different variables)., Reserved words (like JavaScript keywords) cannot be used as names.
Page 42 :
example, <!DOCTYPE html>, <html>, <body>, <h2>JavaScript Variables</h2>, <p>In this example, x, y, and z are variables.</p>, <script>, var x = 8;, var y = 8;, var z = x + y;, document. write ("The value of z is: " + z);, </script>, </body>, </html>
Page 43 :
Variable initialization, Assigning value to that variable is called variable initialization., Syntax:, var <variable-name>=<value>; , Example:, <script>, , var name=“abc”;, var money; //declare, Money=2000;//initialization, , </script> , Use var keyword only for declaration and initialization
Page 44 :
JavaScript Variable Scope, Scope determines the accessibility (visibility) of variables. , Variables defined inside a function are not accessible (visible) from outside the function., In JavaScript there are two types of scope:, Local scope, Global scope, 1.Local Variables: − , A local variable will be visible only within a function where it is defined. , Variables declared within a JavaScript function, become LOCAL to the function., Local variables are only recognized inside their functions, variables with the same name can be used in different functions., Local variables are created when a function starts, and deleted when the function is completed. , They can only be accessed from within the function.
Page 45 :
2.Global Variables − , A global variable has global scope which means it can be defined anywhere in your JavaScript code., A variable declared outside a function, becomes GLOBAL., A global variable has global scope: All scripts and functions on a web page can access it. , <html>, <body onload = checkscope();> , <script type = "text/javascript">, var myVar = "global"; // Declare a global variable, function checkscope( ) {, var myVar = "local"; // Declare a local variable, document.write(myVar); }, </script> , </body>, </html>
Page 46 :
Simple JavaScript Program, <html>, <head>, <title>, Script, </title>, </head>, <body>, <script>, document. write(“welcome”);, </script>, </body>, </html>
Page 47 :
Operators and expressions, Q.What is Operators in JavaScript?Explain any two operators in JavaScript., , JavaScript operators are symbols that are used to perform operations on operands., Example c=a + b;, JavaScript includes following categories of operators., Arithmetic operators,+,-,*,/, Comparison operators.,==,>,<,>=,<=, Logical operators.&&,||, Conditional operators.?:, Assignment operators.=,+=,, Bitwise Operators.&,|,
Page 48 :
Operators, 1.Arithmetic operators: JavaScript supports the following arithmetic operators: Assume variable A holds 10 and variable B holds 20,then:
Page 49 :
Note − Addition operator (+) works for Numeric as well as Strings. + operator performs concatenation operation when one of the operands is of string type.. e.g. "a" + 10 will give "a10".
Page 50 :
2.Comparison Operators: JavaScript supports the following comparison operators −, Assume variable A holds 10 and variable B holds 20, then −
Page 52 :
3.Logical Operators:, JavaScript supports the following logical operators: Assume variable A holds 10 and variable B holds 20,then
Page 53 :
4.Conditional Operators:, JavaScript includes special operator called ternary operator ? :that assigns a value to a variable based on some condition. , Syntax:<condition> ? <value1> : <value2>;
Page 54 :
<html>, <body>, <script>, var a=10,b=5;, var c =a>b?a:b;//10>5?10:5, document.write(c);, </script>, </body>, </html>
Page 55 :
5.Assignment Operators:, JavaScript supports the following assignment operators:
Page 57 :
6.Bitwise Operators:JavaScript supports the following bitwise operators −, Assume variable A holds 2 and variable B holds 3, then −
Page 58 :
5- 0101, 8421, 1111
Page 60 :
Bitwise AND, When a bitwise AND is performed on a pair of bits, it returns 1 if both bits are 1., 4 bit examples, One bit examples
Page 61 :
Bitwise OR, When a bitwise OR is performed on a pair of bits, it returns 1 if one of the bits are 1:, One bit example:, Four bit example
Page 62 :
Bitwise XOR, When a bitwise XOR is performed on a pair of bits, it returns 1 if the bits are different:, One bit example:, Four bit example
Page 65 :
Primary Expressions, , The simplest expressions, known as primary expressions., Primary expressions in JavaScript are constant or literal values, certain language keywords, and variable references., Example:
Page 66 :
Some of JavaScript’s reserved words are primary expressions:
Page 67 :
Finally, the third type of primary expression is the variable reference:
Page 68 :
Q.Explain how object and array initializers work, Object and array initializers are expressions whose value is a newly created object or array. , These initializer expressions are sometimes called “object literals” and “array literals.” , These expressions are not primary expressions, because they include a number of subexpressions that specify property and element values., An array initializer is list of expressions or elements separated by a comma within square brackets., Object and Array Initializers
Page 69 :
Object initializer expressions are like array initializer expressions, but the square brackets are replaced by curly brackets, and each subexpression is prefixed with a property name and a colon:
Page 70 :
Function Expression, Q.Explain function definition expression with example., A JavaScript function can also be defined using an expression., A function expression can be stored in a variable:, var x = function (a, b) {return a * b};, After a function expression has been stored in a variable, the variable can be used as a function. Functions stored in variables do not need function names. They are always invoked (called) using the variable name., ‘function’ keyword is used to define a function with list of zero or more identifiers(parameters)separated by comma in the parentheses with JavaScript code in curly brackets.
Page 72 :
Property Access Expressions, Q.Explain property access expression and invocation expression, , A property access expression evaluates to the value of an object property or an array element. JavaScript defines two syntaxes for property access:
Page 74 :
Invocation Expression, It is a JavaScript syntax for executing functions or methods. It starts with a function expression which identifies the function to be called., The function expression is followed by an opening parenthesis, a list of zero or more arguments separated by comma, and a closing parenthesis.
Page 75 :
What is conditional statement? Explain if..else and if…else if statement with example., , Conditional statements are used to decide the flow of execution based on different conditions. If condition is true you can perform one action and if the condition is false ,you can perform another expression., Conditional statements….., If statement., If..else statement., If ….else if statement., Nested if statement, Switch case statement., Conditional Statements
Page 76 :
If Statement, It evaluates the content only if expression is true., Syntax:, if(condition), { , //content to be evaluated , } , Example: Write a javascript code to demonstrate ‘if ‘statement., <html>, <head>, <title>If statement</title>, </head>, <body>, <script> , var a=20; , if(a>10), { , document.write("value of a is greater than 10"); , } , </script> , </body>, </html>
Page 77 :
JavaScript If...else Statement, , The if else statement executes a block of code if a specified condition is true .if the condition is false ,another block of code can be executed., , The syntax of JavaScript if-else statement is given below., if(expression), { , //content to be evaluated if condition is true , } , else, { , //content to be evaluated if condition is false , }
Page 78 :
Example of if-else statement in JavaScript to find out the even or odd number. <html>, <body>, <script> , var a=20; , if(a%2==0), { , document.write("a is even number"); , } , else, { , document.write("a is odd number"); , } , </script> , </body>, </html>
Page 79 :
JavaScript If...else if statement, It evaluates the content only if expression is true from several expressions. , The signature of JavaScript if else if statement is given below., if(expression1), { , //content to be evaluated if expression1 is true , } , else if(expression2), { , //content to be evaluated if expression2 is true , } , else if(expression3){ , //content to be evaluated if expression3 is true , } , else, { , //content to be evaluated if no expression is true , }
Page 80 :
<html>, <body>, <script> , var a=20; , if(a==10), { , document.write("a is equal to 10"); , } , else if(a==15), , { , document.write("a is equal to 15"); , } , else if(a==20){ , document.write("a is equal to 20"); , } , else{ , document.write("a is not equal to 10, 15 or 20"); , } , </script> , </body>, </html>
Page 81 :
<html>, <body> , <script type = "text/javascript"> , var book = "maths";, if( book == "history" ), { document.write("<b>History Book</b>"); , }, else if( book == "maths" ) , { document.write("<b>Maths Book</b>"); , } , else if( book == "economics" ), { document.write("<b>Economics Book</b>"); , } , else, { document.write("<b>Unknown Book</b>"); , } , </script> , </body>, <html>
Page 82 :
Nested If…Else Statement, Nested-if: A nested if is an if statement that is the target of another if or else. Nested if statements means an if statement inside an if statement. , Syntax:, if ( test condition 1), { , //If the test condition 1 is TRUE then these it will check for test condition 2 , if ( test condition 2) , { , //If the test condition 2 is TRUE then these statements will be executed Test condition 2 True statements; , } , else, { , //If the test condition 2 is FALSE then these statements will be executed Test condition 2 False statements; , } , }, else, {, //If the test condition 1 is FALSE then these statements will be executed Test condition 1 False statements;, }
Page 83 :
Flow Chart- Nested if ….else
Page 84 :
<html>, <head>, <title>nested if...else </title>, </head>, , <body>, <script>, var age = 15;//declare variable age, if( age < 18 ), {, document.write ("not eligible to work " ); , }, else, {, if (age >= 18 && age <= 60 ), {, document.write ("<b> You are Eligible to Work,please fill in your details and apply </b>"+"<br>");, , }, else, {, document.write ("<b> You are too old to work as per the Government rules,please Collect your pension! </b>");, , }, }, </script>, </body>, </html>
Page 85 :
Switch Case Statement, Q.Explain switch case statement in JavaScript with example., , The switch statement evaluates an expression. The value of the expression is then compared with the values of each case in the structure. If there is a match, the associated block of code is executed., , The switch statement is often used together with a break or a default keyword (or both). These are both optional, , The break keyword breaks out of the switch block. This will stop the execution of more execution of code and/or case testing inside the block. If break is omitted, the next code block in the switch statement is executed., The default keyword specifies some code to run if there is no case match. There can only be one default keyword in a switch.
Page 86 :
Syntax:, switch (expression), {, case condition 1: statement(s), break; , case condition 2: statement(s), break; ..., case condition n: statement(s) , break;, default: statement(s), }
Page 87 :
Example: write a code to illustrate use of switch case in JavaScript., <html>, <body>, <script> , var i=3;, switch(i), { , case 0: , document.write("i is zero");, break;, case 1: , document.write("i is 1");, break;, case 2: , document.write("i is 2");, break;, default:, document.write("i is greater than 2");, }, </script>, </body>, </html>
Page 88 :
Loop Statement, What is loop statement?, Loop in JavaScript are used to execute the same block of code a specified number of times or while a specified condition is true., , JavaScript support different kinds of loops., 1.for Loop, 2.while, 3.do….while., 4.for..in loop., 5.continue
Page 89 :
for loop, Q.Explain the for..loop with example., , A for loop repeats until a specified condition evaluates to false. , The JavaScript for loop is similar to the Java and C for loop., , Syntax, for (initialization; test condition; increment/decrement) , { , Statement(s) to be executed if test condition is true, }
Page 90 :
Example: Develop a JavaScript to implement for..loop, <html>, <body>, <h2>for loop</h2>, <script>, var i;, for(i=0;i<5;i++), {, document.write("the no.is="+i+"<br>");, }, </script>, </body>, </html>
Page 91 :
while Loop, The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true. Once the expression becomes false, the loop terminates., , , Syntax, The syntax of while loop in JavaScript is as follows −, , while (expression) , {, Statement(s) to be executed if expression is true, }
Page 92 :
Example to implement while loop., <html>, <body>, <script>, var count=0;//declare variable count, while(count<5), {, document.write("current count:"+count+"<br>");, count++;, }, </script>, </body>, </html>
Page 93 :
do…..while Loop, The do...while loop is similar to the while loop except that the condition check happens at the end of the loop. This means that the loop will always be executed at least once, even if the condition is false., , Syntax, , The syntax for do-while loop in JavaScript is as follows −, do , { , Statement(s) to be executed; , } while (expression); , Note − Don’t miss the semicolon used at the end of the do...while loop.
Page 94 :
Example to implement a do-while loop in JavaScript., <html>, <body>, <script>, var count=0;, do, {, document.write("current count:"+count+"<br>");, count++;, }while(count>5);, </script>, </body>, </html>
Page 95 :
Comparison Chart
Page 96 :
Break and Continue Statement, The break Statement, The break statement, which was briefly introduced with the switch statement, is used to exit a loop early, breaking out of the enclosing curly braces., , , Syntax, break;
Page 97 :
Example, Illustrates the use of a break statement with a while loop., <html>, <body> , <script>, var x = 0;, while (x < 20) , {, if (x == 5) , {, break; , }, x = x + 1;, document.write( x + "<br />");, } , </script>, , , </body>, </html>
Page 98 :
The Continue Statement, The continue statement does not exit from the loop. It terminates the current iteration of the loop and starts the next iteration., , , Syntax, continue;
Page 99 :
Example, Illustrates the use of a continue statement with a while loop., <html>, <body>, <script>, var n=0;, while(n<=5), {, n++;, if(n==4), {, continue;, }, document.write("n="+n+"<br>");, , }, </script>, </body>, </html>
Page 100 :
Comparison Chart
Page 101 :
The for...in loop is used to loop through an object's properties., The JavaScript for in loop is used to iterate the properties of an object. , The for-in loop is a special type of a loop., , Syntax, The syntax of ‘for..in’ loop is − , , for (variable name in object), { , statement or code block to be executed, } , In each iteration, one property from object is assigned to variable name and this loop continues till all the properties of the object are exhausted., for……in loop
Page 102 :
Example to implement for..in loop., <html >, <head>, <title>JavaScript Iterate Over an Array Using For Loop</title>, </head>, <body>, <script>, , var person = {"name”:"Clark", "surname“: "Kent", "age“:36};, var a;, for(var a in person) , { , document.write("<p>" + a + " = " + person[a]+ "</p>"); , }, </script>, </body>, </html>
Page 103 :
Quering,Setting Properties and deleting properties, Q.How to set and delete properties with example., 1.JavaScript – Querying and Setting Properties, To obtain the value of a property, use the dot ( .) or square bracket ( []) operators., The left-hand side should be an expression whose value is an object. , If using the dot operator, the right-hand must be a simple identifier that names the property. , If using square brackets, the value within the brackets must be an expression that evaluates to a string that contains the desired property name., var author = book. author; // Get the "author" property of the book. , var name = author. surname // Get the "surname" property of the author. , var title = book["main title"] // Get the "main title" property of the book. , To create or set a property, use a dot or square brackets, but put them on the left-hand side of an assignment expression:, book. price=300;//create an price property of object., Person[“FirstName”]=“XYZ”;//set the “FirstName" property.
Page 104 :
2.Deleting Properties, Q.How to set and delete properties with example., The delete keyword is used to delete both the value of the property and property itself., delete person. age ;//The person object now has no age property., delete person[“FirstName”]; //The person object now has no FirstName property., The delete property returns true if deleted successfully.
Page 105 :
3.Property Getters and Setters:, Q. Explain property setter and property getter method with example., There are two kinds of object properties., The first kind is data properties. , The second type of properties is something new. It’s accessor properties. They are essentially functions that execute on getting and setting a value, but look like regular properties to an external code., Accessor properties are represented by “getter” and “setter” methods. , When the property is accessed ,the return value from the getter is used., 1.get-a function without arguments, that works when a property is read.
Page 106 :
When a value is set ,the setter is called and passed the value that was set., 2.Set: a function with one argument ,that is called when the property is set.
Page 107 :
Points to Remember :, JavaScript is case sensitive. , JavaScript string must be enclosed in double quotation mark (") or single quotation mark ('). , JavaScript Number can store integer, float, hexadecimal value without enclosing it in quotation marks. , JavaScript boolean value stores true or false. , Every statement in JavaScript can be separated using semicolon (;). It is not mandatory but recommended to use semicolon at the end of each statement., JavaScript ignores multiple white spaces., A multi line comment can be wrapped between /* and */. Single line comment can start with //., JavaScript keywords are reserved words. Do not use them as variable or function names.
Page 108 :
Points to Remember : , JavaScript includes operators that perform some operation on single or multiple operands (data value) and produce a result. , JavaScript includes various categories of operators: Arithmetic operators, Comparison operators, Logical operators, Assignment operators, Conditional operators. Ternary operator ?: is a conditional operator.
Page 109 :
Thank You