Create a function called checkage which has the if statement

Assignment Help Computer Engineering
Reference no: EM133369960

Part 1 : Web Page with a Script Tag

As you did in the previous coding assignments, web page called <first_name>_<last_name>_hw4.html

For instance, I would create a file called:

Antonino_Cacioppo_hw4.html

and then create a simple HTML document with a single header1:

<H1>PART 1: Simple FOR Loop</H1>

<output of your loop>

<H1>PART 2: Simple FOR Loop with IF Condition</H1>

<output of your loop>

<H1>PART 3: Simple While Loop with IF Condition</H1>

<output of your loop>

<H1>PART 4: Simple While Loop with IF Condition using a Function</H1>

<output of your loop>

----- FORMAT ABOVE ----

Part 2 : Replace the Javascript Code in Web Page

PART 1: Simple FOR Loop (3 point)

loop from 1 to 25 and write the output with the loop count. Use the i variable for each loop.

The following is the code you want to put in your loop:

document.write("THIS IS THE FOLLOWING LOOP NUMBER: " + i + "<br");

where i is the variable you are using in your for loop.

PART 2: Simple FOR Loop with IF Condition

 loop from 1 to 25 and write the output with the loop count using age is the loop counter.

Add an IF block to check if the age is less than 18, if so, print the following:

document.write("Your age is " + age + " and you are not able to vote<br");

If the age is equal to or greater than 18, then print:

document.write("Your age is " + age + " and you are able to vote, so vote !!!<br");

PART 3: Simple While Loop with IF Condition

Do the same thing as Part 3 except use a while loop instead. Feel free to use the age variable or new 

Do the same as part 3 but instead create a function called checkAge which has the IF statement with the age check and the document.write call.

Pass in the age of your loop into the function.

Reference no: EM133369960

Questions Cloud

Mock interview in optimal resume~interview : List the two hardest interview questions you encountered during the mock interview in Optimal Resume~Interview
Business may be affected by six environmental factors : Explain how your business may be affected by the six environmental factors? Which factor or factors might have the biggest impact on your business?
What impact do you think this would have on this company : CSC 1014 Cambrian College What impact do YOU think this would have on this company? What do YOU think the company could have done to avoid this breach?
Associated with job description : In an organization with each of these financial positions, which title is most likely to be associated with a job description that is less of a "hands-on" manag
Create a function called checkage which has the if statement : create a function called checkAge which has the IF statement with the age check and the document.write call.
Potential short-term consequences : Make a recommendation based on your analysis. Be sure to include potential short-term consequences and long-term consequences of your decision.
Which court heard the case and who was the judge : Find the court decision located at 144 T.C. 279. Which court heard the case? Who was the judge(s)? In what year was the case decided?
What do you think would help you understand those topics : what do you think would help you understand those topics better? What questions do you still have about system or software architecture
Method for assessing the security threats : method for assessing the security threats that have been discovered fonzy esses. Mogadon. Define anske option strategy and put security controls

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd