SlideShare a Scribd company logo
1 of 2
Download to read offline
Web Authoring                                                                                  Name:
Lesson Completion Sheet

W3School JavaScript
JavaScript Comments, Variables, If…Else, Switch, Operators

For this lesson, you will be going through the JavaScript Comments tutorial on the W3Schools web site located at
www.w3schools.com/js/js_comments.asp, then the JavaScript Variables tutorial on the W3Schools web site located
at www.w3schools.com/js/js_variables.asp, then the JavaScript If…Else tutorial on the W3Schools web site located at
www.w3schools.com/js/js_if_else.asp, then the JavaScript Switch tutorial on the W3Schools web site located at
www.w3schools.com/js/js_statements.asp, then the JavaScript Operators tutorial on the W3Schools web site
located at www.w3schools.com/js/js_operators.asp .

All files that you save as part of this lesson should be saved in a folder called JavaScript Comments inside a folder called
w3school javascript that you create in your network folder for this course.

Assignments                                                                                                  X    X     Grade
Read through the JavaScript Comments tutorial.
Use notepad to create an HTML document. Include a JavaScript section made up of document.write                              /10
statements that would create this: (use one document.write statement for each line)
<h1>Athletics</h1>
<h2>Boys</h2>
<ul>
<li>Basketball</li>
<li>Soccer</li>
<li>Track</li>
</ul>
<h2>Girls</h2>
<ul>
<li>Basketball</li>
<li>Soccer</li>
<li>Volleyball</li>
</ul>

- Add this multi-line comment at the beginning of the script:
This script shows a list of
boys and girls athletic offerings
- Add a single line comment This is the list of boys sports between the Boys header and the beginning of
the list.
- Prevent the list item Track from being displayed by commenting it
- Prevent the entire list under the Girls heading from being displayed by using a multiline comment
- Add an end of line comment aka Sports to the Athletic header line
Save your HTML document as comment1.htm
Read through the JavaScript Variables tutorial.
Look at the Variable example. Use notepad to create an HTML document that contains JavaScript code                          /10
that will save five different words as five different variables, then display those five words. Save your
document as variable1.htm.
Read through the JavaScript If..Else tutorial.
Look at the If statement example. Use notepad to create an HTML document. Copy the HTML from                                /10
the example into your HTML document. Get rid of the stuff in the p tags. Add to the script so that the
greeting “Lunch time!” if the hour value of the time is 12 (12:00-12:59pm) and “Good afternoon” if the
time is greater than 12 (1pm or later). Save your document as if1.htm.
I:My Documentsweb authoringassignmentsw3schools javascript basicw3schools javascript comments.docx               Page 1 of 2
Look at the If…else statement example. Use notepad to create an HTML document. Copy the HTML                           /10
from the example into your HTML document. Get rid of the stuff in the p tags. Change getHours in the
script to getDay, this will give the day of the week, numbered 0-6 (Sunday=0, Monday=1, etc). Change
the script so that on Fridays (day 5), it will display “Thank goodness its Friday!” and so that it will
display “It’s not Friday yet.” On all other days. Save your document as if2.htm.
Look at the If…else if…else statement example. Use notepad to create an HTML document. Copy the                        /10
HTML from the example into your HTML document. Get rid of the stuff in the p tags. Change getHours
in the script to getMonth, this will give the month of the year, numbered 0-11. Change the script so
that in January – May it will display “I can’t wait for summer”; during June, July and August, it will
display “I love the summer!” and in September – December it will display “I can’t wait for summer”
again. Save your document as if3.htm.
Look at the Random link example. Use notepad to create an HTML document. Make an h1 header                             /10
that says “Coin Toss”. Include a JavaScript script that displays a picture of heads or a picture of
tails.based on the random number generate in the script. Save your document as if4.htm ;
Read through the JavaScript Switch tutorial.
Look at the Switch Statement example. Use notepad to creat an HTML document. Write a JavaScript                        /10
script that uses the getMonth command to get the current month number (0-11) then displays the
actual month name. Save your document as switch1.htm
Read through the JavaScript Operators example.
Use notepad to create an HTML document. Think of a sentence that is five words long. Write a                           /10
JavaScript script that stores each of these words in a variable then writes the whole sentence by
“adding” these five variables together. Save your document as operator1.htm.
                                                                                                                       /80

When you have completed the assignments for this lesson, staple any printouts to the back of this sheet in order and
hand it in to the teacher.




I:My Documentsweb authoringassignmentsw3schools javascript basicw3schools javascript comments.docx       Page 2 of 2

More Related Content

Viewers also liked

cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 
Web Design Unit.doc
Web Design Unit.docWeb Design Unit.doc
Web Design Unit.doc
butest
 
Iisec dt-2011-10
Iisec dt-2011-10Iisec dt-2011-10
Iisec dt-2011-10
PaolaReyesR
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
tutorialsruby
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
shashank12march
 

Viewers also liked (20)

Case Study: Sprint Simplifies IT Environment with Speedy Implementation of To...
Case Study: Sprint Simplifies IT Environment with Speedy Implementation of To...Case Study: Sprint Simplifies IT Environment with Speedy Implementation of To...
Case Study: Sprint Simplifies IT Environment with Speedy Implementation of To...
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Web Design Unit.doc
Web Design Unit.docWeb Design Unit.doc
Web Design Unit.doc
 
Iisec dt-2011-10
Iisec dt-2011-10Iisec dt-2011-10
Iisec dt-2011-10
 
Class 1: Welcome to programming
Class 1: Welcome to programmingClass 1: Welcome to programming
Class 1: Welcome to programming
 
Lab 1
Lab 1Lab 1
Lab 1
 
Informanten Efterår 06
Informanten Efterår 06Informanten Efterår 06
Informanten Efterår 06
 
Basic of c &c++
Basic of c &c++Basic of c &c++
Basic of c &c++
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
Aconcagua 2010
Aconcagua 2010Aconcagua 2010
Aconcagua 2010
 
01 basic programming in c++
01 basic programming in c++01 basic programming in c++
01 basic programming in c++
 
How To Use Linked In To Grow Your Business
How To Use Linked In To Grow Your BusinessHow To Use Linked In To Grow Your Business
How To Use Linked In To Grow Your Business
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
 
Loops Basics
Loops BasicsLoops Basics
Loops Basics
 
Intro to C++ Basic
Intro to C++ BasicIntro to C++ Basic
Intro to C++ Basic
 
Loops c++
Loops c++Loops c++
Loops c++
 
Basic concept of c++
Basic concept of c++Basic concept of c++
Basic concept of c++
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 

Similar to w3schools%20javascript%20comments

php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
tutorialsruby
 
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
tutorialsruby
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
Vb script tutorial for qtp[1]
Vb script tutorial for qtp[1]Vb script tutorial for qtp[1]
Vb script tutorial for qtp[1]
srikanthbkm
 

Similar to w3schools%20javascript%20comments (20)

Unit 2.4
Unit 2.4Unit 2.4
Unit 2.4
 
Unit 2.4
Unit 2.4Unit 2.4
Unit 2.4
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
 
Web programming
Web programmingWeb programming
Web programming
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
 
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Vb script tutorial for qtp[1]
Vb script tutorial for qtp[1]Vb script tutorial for qtp[1]
Vb script tutorial for qtp[1]
 
CHAPTER 3 JS (1).pptx
CHAPTER 3  JS (1).pptxCHAPTER 3  JS (1).pptx
CHAPTER 3 JS (1).pptx
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
 
Java scripts
Java scriptsJava scripts
Java scripts
 
Javascript survival for CSBN Sophomores
Javascript survival for CSBN SophomoresJavascript survival for CSBN Sophomores
Javascript survival for CSBN Sophomores
 
First Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NETFirst Pages HTML ASP-ASP.NET
First Pages HTML ASP-ASP.NET
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
Placement and variable 03 (js)
Placement and variable 03 (js)Placement and variable 03 (js)
Placement and variable 03 (js)
 

More from tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
tutorialsruby
 

More from tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

w3schools%20javascript%20comments

  • 1. Web Authoring Name: Lesson Completion Sheet W3School JavaScript JavaScript Comments, Variables, If…Else, Switch, Operators For this lesson, you will be going through the JavaScript Comments tutorial on the W3Schools web site located at www.w3schools.com/js/js_comments.asp, then the JavaScript Variables tutorial on the W3Schools web site located at www.w3schools.com/js/js_variables.asp, then the JavaScript If…Else tutorial on the W3Schools web site located at www.w3schools.com/js/js_if_else.asp, then the JavaScript Switch tutorial on the W3Schools web site located at www.w3schools.com/js/js_statements.asp, then the JavaScript Operators tutorial on the W3Schools web site located at www.w3schools.com/js/js_operators.asp . All files that you save as part of this lesson should be saved in a folder called JavaScript Comments inside a folder called w3school javascript that you create in your network folder for this course. Assignments X X Grade Read through the JavaScript Comments tutorial. Use notepad to create an HTML document. Include a JavaScript section made up of document.write /10 statements that would create this: (use one document.write statement for each line) <h1>Athletics</h1> <h2>Boys</h2> <ul> <li>Basketball</li> <li>Soccer</li> <li>Track</li> </ul> <h2>Girls</h2> <ul> <li>Basketball</li> <li>Soccer</li> <li>Volleyball</li> </ul> - Add this multi-line comment at the beginning of the script: This script shows a list of boys and girls athletic offerings - Add a single line comment This is the list of boys sports between the Boys header and the beginning of the list. - Prevent the list item Track from being displayed by commenting it - Prevent the entire list under the Girls heading from being displayed by using a multiline comment - Add an end of line comment aka Sports to the Athletic header line Save your HTML document as comment1.htm Read through the JavaScript Variables tutorial. Look at the Variable example. Use notepad to create an HTML document that contains JavaScript code /10 that will save five different words as five different variables, then display those five words. Save your document as variable1.htm. Read through the JavaScript If..Else tutorial. Look at the If statement example. Use notepad to create an HTML document. Copy the HTML from /10 the example into your HTML document. Get rid of the stuff in the p tags. Add to the script so that the greeting “Lunch time!” if the hour value of the time is 12 (12:00-12:59pm) and “Good afternoon” if the time is greater than 12 (1pm or later). Save your document as if1.htm. I:My Documentsweb authoringassignmentsw3schools javascript basicw3schools javascript comments.docx Page 1 of 2
  • 2. Look at the If…else statement example. Use notepad to create an HTML document. Copy the HTML /10 from the example into your HTML document. Get rid of the stuff in the p tags. Change getHours in the script to getDay, this will give the day of the week, numbered 0-6 (Sunday=0, Monday=1, etc). Change the script so that on Fridays (day 5), it will display “Thank goodness its Friday!” and so that it will display “It’s not Friday yet.” On all other days. Save your document as if2.htm. Look at the If…else if…else statement example. Use notepad to create an HTML document. Copy the /10 HTML from the example into your HTML document. Get rid of the stuff in the p tags. Change getHours in the script to getMonth, this will give the month of the year, numbered 0-11. Change the script so that in January – May it will display “I can’t wait for summer”; during June, July and August, it will display “I love the summer!” and in September – December it will display “I can’t wait for summer” again. Save your document as if3.htm. Look at the Random link example. Use notepad to create an HTML document. Make an h1 header /10 that says “Coin Toss”. Include a JavaScript script that displays a picture of heads or a picture of tails.based on the random number generate in the script. Save your document as if4.htm ; Read through the JavaScript Switch tutorial. Look at the Switch Statement example. Use notepad to creat an HTML document. Write a JavaScript /10 script that uses the getMonth command to get the current month number (0-11) then displays the actual month name. Save your document as switch1.htm Read through the JavaScript Operators example. Use notepad to create an HTML document. Think of a sentence that is five words long. Write a /10 JavaScript script that stores each of these words in a variable then writes the whole sentence by “adding” these five variables together. Save your document as operator1.htm. /80 When you have completed the assignments for this lesson, staple any printouts to the back of this sheet in order and hand it in to the teacher. I:My Documentsweb authoringassignmentsw3schools javascript basicw3schools javascript comments.docx Page 2 of 2