diff --git a/week-1/calc.html b/week-1/calc.html index 896b5e0..e1bb4b2 100644 --- a/week-1/calc.html +++ b/week-1/calc.html @@ -1,21 +1,45 @@ - - - calc - - + Calculator +

Welcome to my Calculate Page

+ +
- - +

Press F12 on your keyboard to view results in the console view.

+ + + + + + - + \ No newline at end of file diff --git a/week-1/example-to-study.html b/week-1/example-to-study.html deleted file mode 100644 index f2aa335..0000000 --- a/week-1/example-to-study.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - example - - - - - -

example to study

-

- a little demo to figure out -

-
-
-
-
- home
- - diff --git a/week-1/index.html b/week-1/index.html index df6ecbb..902b1d8 100644 --- a/week-1/index.html +++ b/week-1/index.html @@ -1,22 +1,28 @@ - - - home page - - + Homework JS-1 +

Welcome to my HomePage

+

This is a JavaScript Homework WepPage of Week 1

+ +
-

week 1 index.html - - example to study + +

Press Button to print project details to the console.

+

Press F12 on your keyboard to view project details in the console view.

+ +
diff --git a/week-1/team.html b/week-1/team.html index 5841f0a..f798dd3 100644 --- a/week-1/team.html +++ b/week-1/team.html @@ -1,20 +1,35 @@ - - - team page - - + Team +

Welcome to my Team Page

+ +
- +

Press F12 on your keyboard to view Team details in the console view.

+ + + + - + \ No newline at end of file diff --git a/week-2/README.md b/week-2/README.md index 9fecbcd..1762a13 100644 --- a/week-2/README.md +++ b/week-2/README.md @@ -20,9 +20,9 @@ | | your Emoji | your comments | coach emoji | coach comments | | --- | --- | --- | --- | --- | -| Home page | | | | | -| Team page | | | | | -| Calc page | | | | | +| Home page |:+1: | | | | +| Team page |:+1: | | | | +| Calc page |:+1: | | | | --- diff --git a/week-2/calc/data-&-functions.js b/week-2/calc/data-&-functions.js new file mode 100644 index 0000000..ec2cadf --- /dev/null +++ b/week-2/calc/data-&-functions.js @@ -0,0 +1,26 @@ +var n1 = 12; +var n2 = 2; + +function print_vals(a,b){ + console.log(a,b); +} + +function do_math(a,b,func){ + console.log(func(a,b)); +} + +function add(a,b) { + return a+b; +} + +function subtract(a,b){ + return a-b; +} + +function multiply(a,b){ + return a*b; +} + +function divide(a,b){ + return a/b; +} \ No newline at end of file diff --git a/week-2/calc/functions-data.js b/week-2/calc/functions-data.js deleted file mode 100644 index eb6af17..0000000 --- a/week-2/calc/functions-data.js +++ /dev/null @@ -1,8 +0,0 @@ -// data (variables) - - - -// functions - - -/* onclick's */ \ No newline at end of file diff --git a/week-2/calc/index.html b/week-2/calc/index.html index e69de29..f716e9c 100644 --- a/week-2/calc/index.html +++ b/week-2/calc/index.html @@ -0,0 +1,27 @@ + + + + + Calculator +

Welcome to my Calculate Page

+ +
+ + + + +

Press F12 on your keyboard to view results in the console view.

+

CALCULATOR

+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/week-2/calc/onclicks.js b/week-2/calc/onclicks.js index e69de29..ad2a3b4 100644 --- a/week-2/calc/onclicks.js +++ b/week-2/calc/onclicks.js @@ -0,0 +1,11 @@ +var printVal = document.getElementById("print_val"); +var addVal = document.getElementById("add_val"); +var subtVal = document.getElementById("subt_val"); +var multiVal = document.getElementById("multi_val"); +var divVal = document.getElementById("div_val"); + +printVal.onclick = function() {print_vals(n1, n2);} +addVal.onclick = function() {do_math(n1, n2, add);} +subtVal.onclick = function() {do_math(n1, n2, subtract);} +multiVal.onclick = function() {do_math(n1, n2, multiply);} +divVal.onclick = function() {do_math(n1, n2, divide);} \ No newline at end of file diff --git a/week-2/data-&-functions.js b/week-2/data-&-functions.js new file mode 100644 index 0000000..5bbd11a --- /dev/null +++ b/week-2/data-&-functions.js @@ -0,0 +1,11 @@ + +var project_object= { + name :"Europe Education Guide", + link :"www.eduadviser.org", + Description :"An Education Consultancy" +}; + +function print_deets(obj) +{ + console.log(obj); +} diff --git a/week-2/index.html b/week-2/index.html index 7acfc89..46f9135 100644 --- a/week-2/index.html +++ b/week-2/index.html @@ -1,19 +1,26 @@ - + - home page - - - - + Homework JS-2 +

Welcome to my HomePage

+

This is a JavaScript Homework WepPage of Week 1

+ +
-

week 1 index.html - - example to study + +

Press Button to print project details to the console.

+

Press F12 on your keyboard to view project details in the console view.

+ +
+ - + \ No newline at end of file diff --git a/week-2/onclicks.js b/week-2/onclicks.js new file mode 100644 index 0000000..1f50275 --- /dev/null +++ b/week-2/onclicks.js @@ -0,0 +1,4 @@ +var print_details_button = document.getElementById("details-button"); +print_details_button.onclick = function() { + print_deets(project_object); + } \ No newline at end of file diff --git a/week-2/scripts.js b/week-2/scripts.js deleted file mode 100644 index 2f7d91c..0000000 --- a/week-2/scripts.js +++ /dev/null @@ -1,5 +0,0 @@ -// data (variables) - - - -// functions diff --git a/week-2/team/data-&-functions.js b/week-2/team/data-&-functions.js new file mode 100644 index 0000000..3fcb647 --- /dev/null +++ b/week-2/team/data-&-functions.js @@ -0,0 +1,20 @@ +var team_name = "EEG"; +var team_members = ["Mesut","Nelson","Ramiz","Jamal"]; + +function print_team_name(TeamName) +{ + console.log("Team name is : " + TeamName); +} +function print_team_members(TeamMembers) +{ + console.log("Team members are : "); + for(let i=0; i + + + + + + Team Page +

Welcome to my Team Page

+ + +
+ + + + + +

Press Button to print project details to the console.

+

Press F12 on your keyboard to view project details in the console view.

+ +
+
+
+ + + \ No newline at end of file diff --git a/week-2/team/onclicks.js b/week-2/team/onclicks.js index 21c1dc5..fd44292 100644 --- a/week-2/team/onclicks.js +++ b/week-2/team/onclicks.js @@ -1 +1,12 @@ -onclicks.js \ No newline at end of file +var PrintTeamName = document.getElementById("print_team_name"); +PrintTeamName.onclick = function() {print_team_name(team_name);} + +var PrintTeamMembers = document.getElementById("print_team_members"); +PrintTeamMembers.onclick = function() { + print_team_members(team_members); + } + +var PrintIntroduction = document.getElementById("introduction"); +PrintIntroduction.onclick = function() { + introduction(team_name, team_members); +} \ No newline at end of file