GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaScript/JS Basics/challenge_3.html at master · Ch-sriram/JavaScript

Expand file tree

/

challenge_3.html

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
25 lines (24 loc) · 1.1 KB
/

challenge_3.html

Copy path

File metadata and controls

25 lines (24 loc) · 1.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>JS Basics: Coding Challenge III</title>
</head>
<body>
<h1>Coding Challenge III</h1>
<p>
John and his family went on a holiday and went to 3 different restaurants. The bills were $124, $48 and $268. <br/>
To tip the waiter a fair amount, John created a simple tip calculator (as a function). He likes to tip 20% of the bill when the bill is less than $50, 15% when the bill is between $50 and $200, and 10% if the bill is more than $200. <br/>
In the end, John would like to have 2 arrays:<br/>
<ol>
<li>Containing all three tips (one for each bill).</li>
<li>Containing all three final paid amounts (bill + tip).</li>
</ol>
(NOTE: To calculate 20% of a value, simply multiply it with 20/100 = 0.2) <br/>
GOOD LUCK! 😀
</p>
<p><em>Check the developer console for the log</em></p>
<script src="./scripts/challenge_3.js" type="text/javascript"></script>
</body>
</html>
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.