SlideShare a Scribd company logo
1 of 81
Download to read offline
6 ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OBJECTIVES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.1 Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.1  |  Enabling JavaScript in Internet Explorer 7
6.2 Simple Program: Displaying a Line of Text in a Web Page ,[object Object],[object Object],[object Object],[object Object]
Portability Tip 6.1 ,[object Object]
Common Programming Error 6.1 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object]
Software Engineering Observation 6.1 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.1 ,[object Object]
Common Programming Error 6.2 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.2  |  Displaying a line of text.  Script begins Specifies that we are using the JavaScript language Writes an  h1  welcome message in the XHTML document Prevents older browsers that do not support scripting from displaying the text of the script XHTML comment delimiter, commented for correct interpretation by all browsers Script ends
Error-Prevention Tip 6.1 ,[object Object]
6.3 Modifying Our First Program ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Common Programming Error 6.3 ,[object Object]
Fig. 6.3  |  Printing one line with separate statements. Two  write  statements create one line of XHTML text Concatenation operator joins the string together, as it is split into multiple lines
Common Programming Error 6.4 ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Fig. 6.4  |  Printing on multiple lines with a single statement. Inserts line-break Inserts line-break
6.3 Modifying Our First Program (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.5  |  Alert dialog displaying multiple lines. Creates a pop up box that alerts the welcome text to the user
Common Programming Error 6.5 ,[object Object]
Common Programming Error 6.6 ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Fig. 6.6  |  Some common escape sequences.
6.4 Obtaining User Input with  prompt  Dialogs ,[object Object],[object Object],[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.2 ,[object Object]
Good Programming Practice 6.3 ,[object Object]
Common Programming Error 6.7 ,[object Object]
Good Programming Practice 6.4 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Programming Error 6.8 ,[object Object]
Common Programming Error 6.9 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object]
Good Programming Practice 6.5 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Programming Error 6.10 ,[object Object]
Fig. 6.7  |  Prompt box used on a welcome screen (Part 1 of 2).  Declares a new variable  Sets the identifier of the variable to  name Assigns the string entered by the user to the variable  name Inserts the value given to  name  into the XHTML text
Fig. 6.7  |  Prompt box used on a welcome screen (Part 2 of 2).
Fig. 6.8  |  Prompt dialog displayed by the  window  object’s  prompt  method.
Fig. 6.9  |  Addition script (Part 1 of 2).  Assigns the first input from the user to the variable  firstNumber Assigns the second input from the user to the variable  secondNumber Converts the strings entered by the user into integers
Fig. 6.9  |  Addition script (Part 2 of 2).
6.5 Memory Concepts ,[object Object],[object Object],[object Object],[object Object]
Fig. 6.10  |  Memory location showing the name and value of variable  number1 .
Fig. 6.11  |  Memory locations after inputting values for variables  number1  and  number2 .
Fig. 6.12  |  Memory locations after calculating the  sum  of  number1  and  number2  .
6.5 Memory Concepts (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.6 Arithmetic ,[object Object],[object Object],[object Object]
Fig. 6.13  |  Arithmetic operators.
6.6 Arithmetic (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.6 ,[object Object]
Fig. 6.14  |  Precedence of arithmetic operators.
Fig. 6.15  |  Order in which a second-degree polynomial is evaluated.
6.7 Decision Making: Equality and Relational Operators ,[object Object],[object Object],[object Object],[object Object]
Fig. 6.16  |  Equality and relational operators.
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object]
Common Programming Error 6.11 ,[object Object]
Common Programming Error 6.12 ,[object Object]
Common Programming Error 6.13 ,[object Object]
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object]
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object],[object Object]
Fig. 6.17  |  Using equality and relational operators (Part 1 of 3). Set variable  now  to a new  Date  object Assigns  hour  to the value returned by the  Date  object’s  getHours  method Conditional statement: checks whether the current value of  hour  is less than 12 This statement will execute only if the previous condition was true
Fig. 6.17  |  Using equality and relational operators (Part 2 of 3). Conditional statement: checks whether the current value of  hour  is greater than or equal to 12 If  hour  is 12 or greater (the previous condition was true), subtract 12 from the value and reassign it to  hour   Conditional statement: checks whether the current value of  hour  is less than 6 Conditional statement: checks whether the current value of  hour  is greater than or equal to 6
Fig. 6.17  |  Using equality and relational operators (Part 3 of 3).
Good Programming Practice 6.7 ,[object Object]
Good Programming Practice 6.8 ,[object Object]
Good Programming Practice 6.9 ,[object Object]
Common Programming Error 6.14 ,[object Object]
Common Programming Error 6.15 ,[object Object]
Common Programming Error 6.16 ,[object Object]
Good Programming Practice 6.10 ,[object Object]
Good Programming Practice 6.11 ,[object Object]
Fig. 6.18  |  Precedence and associativity of the operators discussed so far.

More Related Content

What's hot

Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web MahmoudOHassouna
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB MahmoudOHassouna
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Mohamed Saleh
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Mohamed Saleh
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and BootstrapMahmoudOHassouna
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewAM Publications
 
wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467Yutaka Takatsu
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETwebhostingguy
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMahmoudOHassouna
 

What's hot (20)

MVC Training Part 2
MVC Training Part 2MVC Training Part 2
MVC Training Part 2
 
MVC Training Part 1
MVC Training Part 1MVC Training Part 1
MVC Training Part 1
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
 
Intro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm ReviewIntro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm Review
 
JSP Error handling
JSP Error handlingJSP Error handling
JSP Error handling
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
 
Ajax
AjaxAjax
Ajax
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and Bootstrap
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overview
 
Unit 1.2
Unit 1.2Unit 1.2
Unit 1.2
 
Jsp element
Jsp elementJsp element
Jsp element
 
wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467
 
Jquery
JqueryJquery
Jquery
 
html tutorial
html tutorialhtml tutorial
html tutorial
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routing
 

Viewers also liked

Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elementsChris Inman
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elementsChris Inman
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A ResearcherChris Inman
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A ResearcherChris Inman
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Viewers also liked (9)

Newsletter
NewsletterNewsletter
Newsletter
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elements
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elements
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A Researcher
 
Grading rubric
Grading rubricGrading rubric
Grading rubric
 
Practice
PracticePractice
Practice
 
Practice
PracticePractice
Practice
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A Researcher
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Chapter 6 ppt

Similar to Chapter 6 ppt (20)

Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
What is java script
What is java scriptWhat is java script
What is java script
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Chapter1
Chapter1Chapter1
Chapter1
 
Javascript
JavascriptJavascript
Javascript
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
 
Java Script
Java ScriptJava Script
Java Script
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Test2
Test2Test2
Test2
 
Test2
Test2Test2
Test2
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 

Recently uploaded

General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 

Recently uploaded (20)

General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 

Chapter 6 ppt

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Fig. 6.1 | Enabling JavaScript in Internet Explorer 7
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Fig. 6.2 | Displaying a line of text. Script begins Specifies that we are using the JavaScript language Writes an h1 welcome message in the XHTML document Prevents older browsers that do not support scripting from displaying the text of the script XHTML comment delimiter, commented for correct interpretation by all browsers Script ends
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Fig. 6.3 | Printing one line with separate statements. Two write statements create one line of XHTML text Concatenation operator joins the string together, as it is split into multiple lines
  • 23.
  • 24.
  • 25. Fig. 6.4 | Printing on multiple lines with a single statement. Inserts line-break Inserts line-break
  • 26.
  • 27. Fig. 6.5 | Alert dialog displaying multiple lines. Creates a pop up box that alerts the welcome text to the user
  • 28.
  • 29.
  • 30.
  • 31. Fig. 6.6 | Some common escape sequences.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. Fig. 6.7 | Prompt box used on a welcome screen (Part 1 of 2). Declares a new variable Sets the identifier of the variable to name Assigns the string entered by the user to the variable name Inserts the value given to name into the XHTML text
  • 47. Fig. 6.7 | Prompt box used on a welcome screen (Part 2 of 2).
  • 48. Fig. 6.8 | Prompt dialog displayed by the window object’s prompt method.
  • 49. Fig. 6.9 | Addition script (Part 1 of 2). Assigns the first input from the user to the variable firstNumber Assigns the second input from the user to the variable secondNumber Converts the strings entered by the user into integers
  • 50. Fig. 6.9 | Addition script (Part 2 of 2).
  • 51.
  • 52. Fig. 6.10 | Memory location showing the name and value of variable number1 .
  • 53. Fig. 6.11 | Memory locations after inputting values for variables number1 and number2 .
  • 54. Fig. 6.12 | Memory locations after calculating the sum of number1 and number2 .
  • 55.
  • 56.
  • 57. Fig. 6.13 | Arithmetic operators.
  • 58.
  • 59.
  • 60. Fig. 6.14 | Precedence of arithmetic operators.
  • 61. Fig. 6.15 | Order in which a second-degree polynomial is evaluated.
  • 62.
  • 63. Fig. 6.16 | Equality and relational operators.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. Fig. 6.17 | Using equality and relational operators (Part 1 of 3). Set variable now to a new Date object Assigns hour to the value returned by the Date object’s getHours method Conditional statement: checks whether the current value of hour is less than 12 This statement will execute only if the previous condition was true
  • 71. Fig. 6.17 | Using equality and relational operators (Part 2 of 3). Conditional statement: checks whether the current value of hour is greater than or equal to 12 If hour is 12 or greater (the previous condition was true), subtract 12 from the value and reassign it to hour Conditional statement: checks whether the current value of hour is less than 6 Conditional statement: checks whether the current value of hour is greater than or equal to 6
  • 72. Fig. 6.17 | Using equality and relational operators (Part 3 of 3).
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81. Fig. 6.18 | Precedence and associativity of the operators discussed so far.