{"id":309,"date":"2018-07-13T07:53:23","date_gmt":"2018-07-13T07:53:23","guid":{"rendered":"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=309"},"modified":"2018-12-07T12:04:33","modified_gmt":"2018-12-07T12:04:33","slug":"web-application-development-ii","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/chapter\/web-application-development-ii\/","title":{"rendered":"Introduction to JAVA Script"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/SGF69RYQydc\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>What is java script?<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">JavaScript is an object-oriented language that allows creation of interactive Web Pages. JavaScript allows user entries, which are loaded into an HTML form to be processed as required. This empowers a web site to return site information according to a user's requests.<\/p>\r\n&nbsp;\r\n\r\nJava Script has following capabilities\r\n<ul>\r\n \t<li>Manipulation of an HTML element<\/li>\r\n \t<li>Event handling: respond to user interaction with form element<\/li>\r\n \t<li>Validation: preprocessing data on the client before submission<\/li>\r\n \t<li>To know browser capabilities<\/li>\r\n \t<li>To create cookies<\/li>\r\n \t<li>Asynchronous processing: loading data from server without reload entire page<\/li>\r\n \t<li>Animation<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Software required for using Java Script<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The best way to learn JavaScript is to type the HTML and scripting code into documents in a any text editor. To test your code you require web browser. Most of the browser available today supports JavaScript.<\/p>\r\n&nbsp;\r\n\r\n<strong>Steps for writing and executing JavaScript<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">1) Write HTML And script code into source document in a text editor<\/p>\r\n<p style=\"text-align: justify\">2) Save the source document file<\/p>\r\n<p style=\"text-align: justify\">3) Open any browser and open source document in browser and view output<\/p>\r\n<p style=\"text-align: justify\">Please note that, if you made any change in your source document then you must save it then refresh browser to view the changes.<\/p>\r\n&nbsp;\r\n\r\n<strong>The &lt;Script&gt; Tag<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">To include JavaScript in HTML document, you must enclose it inside &lt;Script&gt;\u2026&lt;\/Script&gt; tag, you must set type attribute of script tag to text\/JavaScript. You can write script anywhere within HTML document but it is preferable to write it inside &lt;Head&gt; \u2026 &lt;\/Head&gt; tags.<\/p>\r\n&nbsp;\r\n\r\n<strong>Example:<\/strong>\r\n\r\n&nbsp;\r\n\r\n&lt;\u00a0 HTML&gt;\r\n\r\n&lt;HEAD&gt;\r\n\r\n&lt;TITLE&gt;Home Page&lt;\/TITLE&gt; &lt;SCRIPT type = \"text\/javascript\"&gt;\r\n\r\n\/\/\u00a0\u00a0 JavaScript Statements\u2026\r\n\r\n&lt;\/SCRIPT&gt;\r\n\r\n&lt;\/HEAD&gt;\r\n\r\n&lt;BODY&gt; &lt;\/BODY&gt;\r\n\r\n&lt;\/HTML&gt;\r\n\r\n&nbsp;\r\n\r\n<strong style=\"text-align: initial;font-size: 1em\">JavaScript Statement<\/strong>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nThe JavaScript statement does something relevant to the script such as follows:\r\n<ul>\r\n \t<li>Define or initialize variable<\/li>\r\n \t<li>Assign\/change the\u00a0 value of a property or variable<\/li>\r\n \t<li>Invoke object method<\/li>\r\n \t<li>Call function<\/li>\r\n \t<li>Decision making and looping<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Value\/Data types in Java Script<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Every statement in JavaScript deals with different types of data such as number, text, date, Boolean values etc. JavaScript supports four primitive types of values and supports complex types such as arrays and objects. Primitive types are types that can be assigned a single literal value such as number, string or Boolean value.<\/p>\r\n&nbsp;\r\n\r\nThe primitive data types that JavaScript supports are:\r\n<ol>\r\n \t<li style=\"text-align: justify\"><strong>Number: <\/strong>Consists of integer and floating point numbers and the special NaN (not a number) value. Integer literals can be represented in JavaScript in decimal, hexadecimal, and octal form. Floating-point literals are used to represent numbers that require the use of a decimal point Example 33, 12.10, -35.8, 2E3, Ox5F<\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">B<\/strong><strong style=\"text-align: initial;font-size: 1em\">oolean: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of the logical value true and false. JavaScript supports a pure Boolean type that consists of the two values true and false. Logical operators can be used in Boolean expressions. JavaScript automatically converts the Boolean values true and false into 1 and 0 when they are uses in numerical expressions.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">String: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of string values that are enclosed in single or double quotes. JavaScript provides built-in support for strings. A string is a sequence of zero or more characters that are enclosed by double (\") or single (') quotes. If a string begins with a double quote it must end with a double quote. If a string begins with a single quote it must end with a single quote. For example, \"Rahul\", '24, Sanjay Nagar, Bangalore'<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Null: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of a single value, null, which identifies a null, empty or nonexistent reference. The null value is common to all JavaScript types. It is used to set a variable to an initial value that is different from other valid values. Use of the null value prevents the sort of errors that result from using un-initialized variables. The null value is automatically converted to default values of other types when used in an expression.<\/span><\/li>\r\n<\/ol>\r\n&nbsp;\r\n\r\n<strong>JavaScript Identifier<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">JavaScript variables or function must be identified with unique names called identifiers. The JavaScript identifiers are case-sensitive. The general rules for constructing names for variables or function are:<span style=\"text-align: initial;font-size: 1em\">\u00a0 Identifier can contain letters, digits, underscores, and dollar signs.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n<ul>\r\n \t<li style=\"text-align: left\">Identifier must begin with a letter<\/li>\r\n \t<li style=\"text-align: left\">Identifier can also begin with $ and _ (but we will not use it in this tutorial)<\/li>\r\n \t<li style=\"text-align: left\">Identifier are case sensitive (y and Y are different variables)<\/li>\r\n \t<li style=\"text-align: left\">Keyword cannot be used as names<\/li>\r\n<\/ul>\r\n&nbsp;\r\n<p style=\"text-align: left\"><strong>Operators supported by JavaScript<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">An operator is used to transform one or more values into a single resultant value. The value to which the operator is applied is referred to as operands. A combination of an operator and its operands is referred to as an expression. Following are the types of operators available in JavaScript with symbol, meaning and example.<\/p>\r\n<img class=\"alignnone size-full wp-image-312 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153.png\" alt=\"\" width=\"585\" height=\"549\" \/>\r\n<p style=\"text-align: justify\">The equal (==) and not equal (!=) operators perform type conversions before testing for equality. For example, \"5\" == 5 evaluate to true.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The strictly equal (===) and the strictly not equal (!===) do not perfom1 type conversions before testing for equality. For example, \"5\" === 5 will return the value false<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">String Operators<\/strong><\/p>\r\n\r\n<\/div>\r\n<div>\r\n<ul>\r\n \t<li style=\"text-align: justify\">String operators are those operators that are used to perform operations on strings. Currently JavaScript supports only the string concatenation (+) operator. This operator is used to join two strings. For example, \"pq\" + \"ab\" produces \"pqab\".<\/li>\r\n<\/ul>\r\n<strong>\u00a0 \u00a0 \u00a0Assignment Operators<\/strong>\r\n<ul>\r\n \t<li style=\"text-align: justify\">The assignment operator is used to update the value of a variable. Some assignment operators are combined with other operators to perform a computation on the value contained in a variable and then update the variable with the new value. Some of the assignment operators supported by JavaScript are:<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>JavaScript Statement<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A statement is the basic action item in any program code. In effect, each statement is telling the computer to do something. Statements can be divided up into five categories:<\/p>\r\n\r\n<ul>\r\n \t<li>Control structure of Java Script<\/li>\r\n \t<li>Conditional<\/li>\r\n \t<li>Loops<\/li>\r\n \t<li>Object manipulation<\/li>\r\n \t<li>Comments<\/li>\r\n \t<li>Expressions<\/li>\r\n<\/ul>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Control structures are used to make decision and loop around to repeat statements. JavaScript provide various kinds of control structure for handling various programming situations. Following are the examples of different types of statement with their purpose and example.<\/p>\r\n&nbsp;\r\n\r\n<\/div>\r\n<div><img class=\"size-full wp-image-313 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154.png\" alt=\"\" width=\"575\" height=\"258\" \/><\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-314 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155.png\" alt=\"\" width=\"569\" height=\"231\" \/>\r\n<p style=\"text-align: left\"><strong>Expression<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">An expression is anything that returns a value. Following table lists the common types of expressions, along with an example of their use.<\/p>\r\n<p style=\"text-align: center\"><img class=\"alignnone size-full wp-image-315 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156.png\" alt=\"\" width=\"422\" height=\"294\" \/><\/p>\r\n<p style=\"text-align: center\"><strong>JavaScript\u2019s Built-in Classes<\/strong><\/p>\r\n<p style=\"text-align: justify\">Following are some of the classes exist in JavaScript along with a brief description of the functionality each class provides<\/p>\r\n<img class=\"alignnone size-full wp-image-316 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157.png\" alt=\"\" width=\"472\" height=\"125\" \/>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: left\"><strong>String Object\u2019s Built-in Functionality<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">String objects are given a number of predefined functions, which allow you to perform all sorts of manipulations on them<\/p>\r\n<img class=\"alignnone size-full wp-image-317 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158.png\" alt=\"\" width=\"616\" height=\"402\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Arrays<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Array is most useful construct in JavaScript. Array is collection of similar types of data. You can access data inside array using array name and index which starts from zero. Array is an object in JavaScript. Data that can be stored inside array can be any data type including object.<\/p>\r\n&nbsp;\r\n\r\n<strong>Creating array and accessing array data<\/strong>\r\n\r\n&nbsp;\r\n\r\n<span style=\"font-size: 1em\">To create array syntax is: var &lt;var-name&gt; = new Array(size);<\/span>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">Here var-name is the name of variable and size refers to number of array elements. Example: var a = new Array(5);<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">The above statement will create array with name a and no of elements inside array is five.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">To access element of an array we can use index. For example following statement will assign value \u201cHimanshu\u201d to first element of an array<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">A[0]=\u201dHimanshu\u201d;<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">Following are different methods of array with its purpose.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"alignnone size-full wp-image-318 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159.png\" alt=\"\" width=\"584\" height=\"271\" \/>\r\n\r\n<strong>Functions in JavaScript<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A function is a definition of a set of action. Function can be invoked by JavaScript Statement defined somewhere else. A function can return a value to the calling statement. The objective of function is to provide reusability. There are two types of functions available<\/p>\r\n&nbsp;\r\n\r\n1) Global function: readily available to use inside JavaScript\r\n\r\n2) User defined function: Defined by user. Syntax for user defined function is:\r\n\r\n&nbsp;\r\n\r\nfunction function_name ([parameter1]\u2026[parameterN]) { \/\/ statements\r\n\r\n}\r\n\r\nExample:\r\n\r\nfunction helloworld()\r\n\r\n{\r\n\r\n<span style=\"font-size: 1em\">document.write(\u201cHello World !\u201d);<\/span>\r\n\r\n<span style=\"font-size: 1em\">}<\/span>\r\n\r\n<span style=\"font-size: 1em\">Following are some example of global functions with its description to use.<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"alignnone size-full wp-image-319 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160.png\" alt=\"\" width=\"590\" height=\"182\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>The Document Object Model (DOM)<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Document Object Model (DOM) is the World Wide Web Consortium (W3C) standard for accessing documents. It is a platform and language-neutral interface and allows programs and scripts to dynamically access and update the content, structure, and style of a document. Following figure represents partial Document Object Model hierarchy.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"alignnone size-full wp-image-320 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161.png\" alt=\"\" width=\"576\" height=\"442\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">For example if we have HTML Text element with name property set to \u201csname\u201d and we want to convert it into uppercase. We can write down following code inside JavaScript to do the same.<\/span><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\nvar sname = document.getElementById(\"sname\");\r\n\r\nsname.value = sname.value.toUpperCase();\r\n\r\n&nbsp;\r\n\r\n<strong>Event<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">JavaScript's interaction with HTML is handled through events. Events are actions that take place in a document by the user. Some Example of events includes when the page opens or closed, clicking a button and typing text in text field. The code which is used to handle event is known as Event handlers. Following are example of different types of event and brief description.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-321 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162.png\" alt=\"\" width=\"577\" height=\"412\" \/>\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Introduction to JAVA Script<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/SGF69RYQydc\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>References<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">1) JavaScript: The Complete Reference, Second Edition, by Thomas Powell and Fritz Schneider, McGraw-Hill\/Osborne<\/p>\r\n<p style=\"text-align: justify\">2) JavaScript Bible, Wiley Publishing, Danny Goodman with Michael Morrison<\/p>\r\n<p style=\"text-align: justify\">3) Beginning JavaScript with DOM Scripting and Ajax From Novice to Professional The ultimate guide to modern JavaScript development, Christian Heilmann, Apress<\/p>\r\n&nbsp;","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/SGF69RYQydc\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>What is java script?<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">JavaScript is an object-oriented language that allows creation of interactive Web Pages. JavaScript allows user entries, which are loaded into an HTML form to be processed as required. This empowers a web site to return site information according to a user&#8217;s requests.<\/p>\n<p>&nbsp;<\/p>\n<p>Java Script has following capabilities<\/p>\n<ul>\n<li>Manipulation of an HTML element<\/li>\n<li>Event handling: respond to user interaction with form element<\/li>\n<li>Validation: preprocessing data on the client before submission<\/li>\n<li>To know browser capabilities<\/li>\n<li>To create cookies<\/li>\n<li>Asynchronous processing: loading data from server without reload entire page<\/li>\n<li>Animation<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Software required for using Java Script<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The best way to learn JavaScript is to type the HTML and scripting code into documents in a any text editor. To test your code you require web browser. Most of the browser available today supports JavaScript.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Steps for writing and executing JavaScript<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1) Write HTML And script code into source document in a text editor<\/p>\n<p style=\"text-align: justify\">2) Save the source document file<\/p>\n<p style=\"text-align: justify\">3) Open any browser and open source document in browser and view output<\/p>\n<p style=\"text-align: justify\">Please note that, if you made any change in your source document then you must save it then refresh browser to view the changes.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>The &lt;Script&gt; Tag<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To include JavaScript in HTML document, you must enclose it inside &lt;Script&gt;\u2026&lt;\/Script&gt; tag, you must set type attribute of script tag to text\/JavaScript. You can write script anywhere within HTML document but it is preferable to write it inside &lt;Head&gt; \u2026 &lt;\/Head&gt; tags.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&lt;\u00a0 HTML&gt;<\/p>\n<p>&lt;HEAD&gt;<\/p>\n<p>&lt;TITLE&gt;Home Page&lt;\/TITLE&gt; &lt;SCRIPT type = &#8220;text\/javascript&#8221;&gt;<\/p>\n<p>\/\/\u00a0\u00a0 JavaScript Statements\u2026<\/p>\n<p>&lt;\/SCRIPT&gt;<\/p>\n<p>&lt;\/HEAD&gt;<\/p>\n<p>&lt;BODY&gt; &lt;\/BODY&gt;<\/p>\n<p>&lt;\/HTML&gt;<\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"text-align: initial;font-size: 1em\">JavaScript Statement<\/strong><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>The JavaScript statement does something relevant to the script such as follows:<\/p>\n<ul>\n<li>Define or initialize variable<\/li>\n<li>Assign\/change the\u00a0 value of a property or variable<\/li>\n<li>Invoke object method<\/li>\n<li>Call function<\/li>\n<li>Decision making and looping<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Value\/Data types in Java Script<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Every statement in JavaScript deals with different types of data such as number, text, date, Boolean values etc. JavaScript supports four primitive types of values and supports complex types such as arrays and objects. Primitive types are types that can be assigned a single literal value such as number, string or Boolean value.<\/p>\n<p>&nbsp;<\/p>\n<p>The primitive data types that JavaScript supports are:<\/p>\n<ol>\n<li style=\"text-align: justify\"><strong>Number: <\/strong>Consists of integer and floating point numbers and the special NaN (not a number) value. Integer literals can be represented in JavaScript in decimal, hexadecimal, and octal form. Floating-point literals are used to represent numbers that require the use of a decimal point Example 33, 12.10, -35.8, 2E3, Ox5F<\/li>\n<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">B<\/strong><strong style=\"text-align: initial;font-size: 1em\">oolean: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of the logical value true and false. JavaScript supports a pure Boolean type that consists of the two values true and false. Logical operators can be used in Boolean expressions. JavaScript automatically converts the Boolean values true and false into 1 and 0 when they are uses in numerical expressions.<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">String: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of string values that are enclosed in single or double quotes. JavaScript provides built-in support for strings. A string is a sequence of zero or more characters that are enclosed by double (&#8220;) or single (&#8216;) quotes. If a string begins with a double quote it must end with a double quote. If a string begins with a single quote it must end with a single quote. For example, &#8220;Rahul&#8221;, &#8217;24, Sanjay Nagar, Bangalore&#8217;<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">Null: <\/strong><span style=\"text-align: initial;font-size: 1em\">Consists of a single value, null, which identifies a null, empty or nonexistent reference. The null value is common to all JavaScript types. It is used to set a variable to an initial value that is different from other valid values. Use of the null value prevents the sort of errors that result from using un-initialized variables. The null value is automatically converted to default values of other types when used in an expression.<\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>JavaScript Identifier<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">JavaScript variables or function must be identified with unique names called identifiers. The JavaScript identifiers are case-sensitive. The general rules for constructing names for variables or function are:<span style=\"text-align: initial;font-size: 1em\">\u00a0 Identifier can contain letters, digits, underscores, and dollar signs.<\/span><\/p>\n<\/div>\n<div>\n<ul>\n<li style=\"text-align: left\">Identifier must begin with a letter<\/li>\n<li style=\"text-align: left\">Identifier can also begin with $ and _ (but we will not use it in this tutorial)<\/li>\n<li style=\"text-align: left\">Identifier are case sensitive (y and Y are different variables)<\/li>\n<li style=\"text-align: left\">Keyword cannot be used as names<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\"><strong>Operators supported by JavaScript<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">An operator is used to transform one or more values into a single resultant value. The value to which the operator is applied is referred to as operands. A combination of an operator and its operands is referred to as an expression. Following are the types of operators available in JavaScript with symbol, meaning and example.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-312 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153.png\" alt=\"\" width=\"585\" height=\"549\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153.png 585w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153-300x282.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153-65x61.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153-225x211.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-153-350x328.png 350w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<p style=\"text-align: justify\">The equal (==) and not equal (!=) operators perform type conversions before testing for equality. For example, &#8220;5&#8221; == 5 evaluate to true.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The strictly equal (===) and the strictly not equal (!===) do not perfom1 type conversions before testing for equality. For example, &#8220;5&#8221; === 5 will return the value false<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">String Operators<\/strong><\/p>\n<\/div>\n<div>\n<ul>\n<li style=\"text-align: justify\">String operators are those operators that are used to perform operations on strings. Currently JavaScript supports only the string concatenation (+) operator. This operator is used to join two strings. For example, &#8220;pq&#8221; + &#8220;ab&#8221; produces &#8220;pqab&#8221;.<\/li>\n<\/ul>\n<p><strong>\u00a0 \u00a0 \u00a0Assignment Operators<\/strong><\/p>\n<ul>\n<li style=\"text-align: justify\">The assignment operator is used to update the value of a variable. Some assignment operators are combined with other operators to perform a computation on the value contained in a variable and then update the variable with the new value. Some of the assignment operators supported by JavaScript are:<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>JavaScript Statement<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A statement is the basic action item in any program code. In effect, each statement is telling the computer to do something. Statements can be divided up into five categories:<\/p>\n<ul>\n<li>Control structure of Java Script<\/li>\n<li>Conditional<\/li>\n<li>Loops<\/li>\n<li>Object manipulation<\/li>\n<li>Comments<\/li>\n<li>Expressions<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Control structures are used to make decision and loop around to repeat statements. JavaScript provide various kinds of control structure for handling various programming situations. Following are the examples of different types of statement with their purpose and example.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-313 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154.png\" alt=\"\" width=\"575\" height=\"258\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154.png 575w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154-300x135.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154-65x29.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154-225x101.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-154-350x157.png 350w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-314 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155.png\" alt=\"\" width=\"569\" height=\"231\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155.png 569w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155-300x122.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155-65x26.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155-225x91.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-155-350x142.png 350w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/p>\n<p style=\"text-align: left\"><strong>Expression<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">An expression is anything that returns a value. Following table lists the common types of expressions, along with an example of their use.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-315 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156.png\" alt=\"\" width=\"422\" height=\"294\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156.png 422w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156-300x209.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156-225x157.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-156-350x244.png 350w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><\/p>\n<p style=\"text-align: center\"><strong>JavaScript\u2019s Built-in Classes<\/strong><\/p>\n<p style=\"text-align: justify\">Following are some of the classes exist in JavaScript along with a brief description of the functionality each class provides<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-316 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157.png\" alt=\"\" width=\"472\" height=\"125\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157.png 472w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157-300x79.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157-225x60.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-157-350x93.png 350w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\"><strong>String Object\u2019s Built-in Functionality<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">String objects are given a number of predefined functions, which allow you to perform all sorts of manipulations on them<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-317 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158.png\" alt=\"\" width=\"616\" height=\"402\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158.png 616w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158-300x196.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158-65x42.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158-225x147.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-158-350x228.png 350w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Arrays<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Array is most useful construct in JavaScript. Array is collection of similar types of data. You can access data inside array using array name and index which starts from zero. Array is an object in JavaScript. Data that can be stored inside array can be any data type including object.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Creating array and accessing array data<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 1em\">To create array syntax is: var &lt;var-name&gt; = new Array(size);<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">Here var-name is the name of variable and size refers to number of array elements. Example: var a = new Array(5);<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">The above statement will create array with name a and no of elements inside array is five.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">To access element of an array we can use index. For example following statement will assign value \u201cHimanshu\u201d to first element of an array<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">A[0]=\u201dHimanshu\u201d;<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: left;font-size: 1em\">Following are different methods of array with its purpose.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-318 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159.png\" alt=\"\" width=\"584\" height=\"271\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159.png 584w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159-300x139.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159-65x30.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159-225x104.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-159-350x162.png 350w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<p><strong>Functions in JavaScript<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A function is a definition of a set of action. Function can be invoked by JavaScript Statement defined somewhere else. A function can return a value to the calling statement. The objective of function is to provide reusability. There are two types of functions available<\/p>\n<p>&nbsp;<\/p>\n<p>1) Global function: readily available to use inside JavaScript<\/p>\n<p>2) User defined function: Defined by user. Syntax for user defined function is:<\/p>\n<p>&nbsp;<\/p>\n<p>function function_name ([parameter1]\u2026[parameterN]) { \/\/ statements<\/p>\n<p>}<\/p>\n<p>Example:<\/p>\n<p>function helloworld()<\/p>\n<p>{<\/p>\n<p><span style=\"font-size: 1em\">document.write(\u201cHello World !\u201d);<\/span><\/p>\n<p><span style=\"font-size: 1em\">}<\/span><\/p>\n<p><span style=\"font-size: 1em\">Following are some example of global functions with its description to use.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-319 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160.png\" alt=\"\" width=\"590\" height=\"182\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160.png 590w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160-300x93.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160-65x20.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160-225x69.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-160-350x108.png 350w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>The Document Object Model (DOM)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Document Object Model (DOM) is the World Wide Web Consortium (W3C) standard for accessing documents. It is a platform and language-neutral interface and allows programs and scripts to dynamically access and update the content, structure, and style of a document. Following figure represents partial Document Object Model hierarchy.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-320 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161.png\" alt=\"\" width=\"576\" height=\"442\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161.png 576w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161-300x230.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161-65x50.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161-225x173.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-161-350x269.png 350w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">For example if we have HTML Text element with name property set to \u201csname\u201d and we want to convert it into uppercase. We can write down following code inside JavaScript to do the same.<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>var sname = document.getElementById(&#8220;sname&#8221;);<\/p>\n<p>sname.value = sname.value.toUpperCase();<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Event<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">JavaScript&#8217;s interaction with HTML is handled through events. Events are actions that take place in a document by the user. Some Example of events includes when the page opens or closed, clicking a button and typing text in text field. The code which is used to handle event is known as Event handlers. Following are example of different types of event and brief description.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-321 aligncenter\" src=\"http:\/\/itp9.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162.png\" alt=\"\" width=\"577\" height=\"412\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162.png 577w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162-300x214.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162-65x46.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162-225x161.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-content\/uploads\/sites\/29\/2018\/07\/1-162-350x250.png 350w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Introduction to JAVA Script<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/SGF69RYQydc\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>References<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1) JavaScript: The Complete Reference, Second Edition, by Thomas Powell and Fritz Schneider, McGraw-Hill\/Osborne<\/p>\n<p style=\"text-align: justify\">2) JavaScript Bible, Wiley Publishing, Danny Goodman with Michael Morrison<\/p>\n<p style=\"text-align: justify\">3) Beginning JavaScript with DOM Scripting and Ajax From Novice to Professional The ultimate guide to modern JavaScript development, Christian Heilmann, Apress<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":3,"menu_order":32,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["mr-himanshu-patel"],"pb_section_license":""},"chapter-type":[],"contributor":[61],"license":[],"class_list":["post-309","chapter","type-chapter","status-publish","hentry","contributor-mr-himanshu-patel"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":11,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/309\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/309\/revisions\/525"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapters\/309\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/pressbooks\/v2\/chapter-type?post=309"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/contributor?post=309"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp9\/wp-json\/wp\/v2\/license?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}