Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions week-1/calc.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
<!doctype html>
!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8">

<title>calc</title>
<title>calculation</title>

<script type="text/javascript">
// data (variables)

// data (variables)
var x = 40;
var y= 20 ;
// functions
function add(x,y){

return x + y;

}
function subtract(x,y){

return x - y;

}
function multiply(x,y){

return x * y;
}
function divide(x,y){

return x / y;
}
</script>
</head>

<body>


<h1>Calculation Page</h1>
<p>There are some calculations below</p>

<button onclick="console.log(x,y);">Display X,Y </button> <br><br>
<button onclick="console.log(add(x,y));">Add</button> <br><br>
<button onclick="console.log(subtract(x,y));">Subtract</button> <br><br>
<button onclick="console.log(multiply(x,y));">Multiply</button> <br><br>
<button onclick="console.log(divide(x,y));">Divide</button> <br><br>
<hr>
<a href="./index.html">home</a> <br>
</body>
</html>
46 changes: 30 additions & 16 deletions week-1/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
<!doctype html>

!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

<title>home page</title>

<script type="text/javascript">
// data (variables)

// functions
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Home Page</title>
</head>
<script type="text/javascript" >
// data (variables)
var object = {
name: "Help Everybody",
link: "http/www.helpeverybody.com",
description: "Charity Organization"
};

</script>
</head>
// functions
function print_deets(object) {
console.log(object.name);
console.log(object.link);
console.log(object.description);
}

</script>

<body>
<h1>Project Website</h1>
<p>This is our homepage.</p>
<button onclick="print_deets(object)">Project Details</button><br>

<body>
<h1>week 1 index.html</a>
<!-- delete this button when you're ready to start! -->
<a href="./example-to-study.html">example to study</a>
</body>
<br><a href="./calc.html">Calculation Page</a><br>
<br><a href="./team.html">Team Page</a><br>
</body>
</html>
40 changes: 28 additions & 12 deletions week-1/team.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
<!doctype html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

<title>team page</title>

<script type="text/javascript">
// data (variables)
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<script type="text/javascript">

// functions
var teamName ="Anonymous";
var teamMembers =["Jude", "Hans", "Rahime"];

</script>
</head>
//Functions
function print_name(teamName) {
console.log(teamName);

}
function print_members(teamMembers)
console.log(teamMembers);

function print_team_introduction(teamName, teamMembers) {
print_name(teamName);
print_members(teamMembers);
}

</script>
<body>

<h1>Hi! This is Team Page</h1><br>
<button type="button" onclick="print_name(teamName)" >Name</button><br><br>
<button type="button" onclick="print_members(teamMembers)">Members</button><br><br>
<button type="button" onclick="print_team_introduction(teamName, teamMembers)">Introduction</button>
<a href="./index.html">Home Page</a>

</body>
</html>