From 14ac366176a76b52482e4c74f54e1c6be322bdab Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 19:23:01 +0200 Subject: [PATCH 01/19] step1 completed --- javascript-basics-01/Step_1.html | 1 + javascript-basics-01/Step_1.html + Step_1.js | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 javascript-basics-01/Step_1.html + Step_1.js diff --git a/javascript-basics-01/Step_1.html b/javascript-basics-01/Step_1.html index de81630..95b12fa 100644 --- a/javascript-basics-01/Step_1.html +++ b/javascript-basics-01/Step_1.html @@ -3,6 +3,7 @@ Step 1 + diff --git a/javascript-basics-01/Step_1.html + Step_1.js b/javascript-basics-01/Step_1.html + Step_1.js new file mode 100644 index 0000000..e97462e --- /dev/null +++ b/javascript-basics-01/Step_1.html + Step_1.js @@ -0,0 +1,2 @@ +var name ; +alert("name"); \ No newline at end of file From 35566b95b4ead4cec9e9da1ccd1bead987762729 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 20:58:15 +0200 Subject: [PATCH 02/19] step2 completed --- javascript-basics-01/Step_2.html | 1 + javascript-basics-01/Step_2.html + Step_2.js | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 javascript-basics-01/Step_2.html + Step_2.js diff --git a/javascript-basics-01/Step_2.html b/javascript-basics-01/Step_2.html index a214720..6e2e8c7 100644 --- a/javascript-basics-01/Step_2.html +++ b/javascript-basics-01/Step_2.html @@ -3,6 +3,7 @@ Step 2 + diff --git a/javascript-basics-01/Step_2.html + Step_2.js b/javascript-basics-01/Step_2.html + Step_2.js new file mode 100644 index 0000000..d282d90 --- /dev/null +++ b/javascript-basics-01/Step_2.html + Step_2.js @@ -0,0 +1,5 @@ +var name="Doe"; +var surname="john"; +var city="New-York"; +alert("Nom:"+name+"\nprenom:"+surname+"\nville:"+city); + From ec67d9b4a01bd987ca0bf3fbb3901afcd0b60d1c Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 21:13:46 +0200 Subject: [PATCH 03/19] step3 completed --- javascript-basics-01/Step_3.html | 1 + javascript-basics-01/Step_3.html + Step_3.js | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 javascript-basics-01/Step_3.html + Step_3.js diff --git a/javascript-basics-01/Step_3.html b/javascript-basics-01/Step_3.html index 20b2a19..c859be6 100644 --- a/javascript-basics-01/Step_3.html +++ b/javascript-basics-01/Step_3.html @@ -3,6 +3,7 @@ Step 3 + diff --git a/javascript-basics-01/Step_3.html + Step_3.js b/javascript-basics-01/Step_3.html + Step_3.js new file mode 100644 index 0000000..8177b37 --- /dev/null +++ b/javascript-basics-01/Step_3.html + Step_3.js @@ -0,0 +1,2 @@ +var name=prompt("what's your name ?"); +alert("hello, "+name) \ No newline at end of file From 9180e694423e586a06f5a14f3e5657c97aff6013 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 21:30:07 +0200 Subject: [PATCH 04/19] step4 completed --- javascript-basics-01/Step_4.html | 1 + javascript-basics-01/Step_4.html + Step_4.js | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 javascript-basics-01/Step_4.html + Step_4.js diff --git a/javascript-basics-01/Step_4.html b/javascript-basics-01/Step_4.html index 12c8942..aa108e9 100644 --- a/javascript-basics-01/Step_4.html +++ b/javascript-basics-01/Step_4.html @@ -3,6 +3,7 @@ Step 4 +
diff --git a/javascript-basics-01/Step_4.html + Step_4.js b/javascript-basics-01/Step_4.html + Step_4.js new file mode 100644 index 0000000..b32c83a --- /dev/null +++ b/javascript-basics-01/Step_4.html + Step_4.js @@ -0,0 +1,4 @@ +var name=prompt("enter your name"); +var surname=prompt("enter your surname"); +var city=prompt("enter your city"); +alert("Nom:"+name+"\nprenom:"+surname+"\nville:"+city); \ No newline at end of file From 9988d060226b5f5ead66a6a251cf5d2145ae7e29 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 21:38:53 +0200 Subject: [PATCH 05/19] step5 completed --- javascript-basics-01/Step_5.html | 1 + javascript-basics-01/Step_5.html + Step_5.js | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 javascript-basics-01/Step_5.html + Step_5.js diff --git a/javascript-basics-01/Step_5.html b/javascript-basics-01/Step_5.html index 60479f2..9d0394e 100644 --- a/javascript-basics-01/Step_5.html +++ b/javascript-basics-01/Step_5.html @@ -3,6 +3,7 @@ Step 5 + diff --git a/javascript-basics-01/Step_5.html + Step_5.js b/javascript-basics-01/Step_5.html + Step_5.js new file mode 100644 index 0000000..e263621 --- /dev/null +++ b/javascript-basics-01/Step_5.html + Step_5.js @@ -0,0 +1,4 @@ +var num1=prompt("enter the first number"); +var num2=prompt("enter the second number"); +var result=num1*num2; +alert("result is "+result); \ No newline at end of file From f601fcc7b071cb8922b513f0f1fb20905d80f9df Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 21:57:00 +0200 Subject: [PATCH 06/19] step6 completed --- javascript-basics-01/Step_6.html | 1 + javascript-basics-01/Step_6.html + Step_6.js | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 javascript-basics-01/Step_6.html + Step_6.js diff --git a/javascript-basics-01/Step_6.html b/javascript-basics-01/Step_6.html index b019dcc..a2c1da1 100644 --- a/javascript-basics-01/Step_6.html +++ b/javascript-basics-01/Step_6.html @@ -3,6 +3,7 @@ Step 6 + diff --git a/javascript-basics-01/Step_6.html + Step_6.js b/javascript-basics-01/Step_6.html + Step_6.js new file mode 100644 index 0000000..5809b14 --- /dev/null +++ b/javascript-basics-01/Step_6.html + Step_6.js @@ -0,0 +1,4 @@ +var num1=prompt("enter the first number"); +var num2=prompt("enter the second number"); +var result=num1%num2; +alert("result is "+result); \ No newline at end of file From 845a2e8a34ebe3ad605b801d457f6a0cb487f1fc Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 22:13:48 +0200 Subject: [PATCH 07/19] step7 complited --- javascript-basics-01/Step_7.html | 1 + javascript-basics-01/Step_7.html + Step_7.js | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 javascript-basics-01/Step_7.html + Step_7.js diff --git a/javascript-basics-01/Step_7.html b/javascript-basics-01/Step_7.html index 05ff583..849f95d 100644 --- a/javascript-basics-01/Step_7.html +++ b/javascript-basics-01/Step_7.html @@ -3,6 +3,7 @@ Step 7 + diff --git a/javascript-basics-01/Step_7.html + Step_7.js b/javascript-basics-01/Step_7.html + Step_7.js new file mode 100644 index 0000000..99b7a30 --- /dev/null +++ b/javascript-basics-01/Step_7.html + Step_7.js @@ -0,0 +1,6 @@ +var shoe=prompt("enter your shoe number"); +var birth=prompt("enter your birth year"); +function res(){ +result=(((((shoe*2)+5)*50)-birth)+1766); +alert("result is "+result);} +res(); \ No newline at end of file From 5da795b5842166507d11a258aae138443432b1bd Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Tue, 23 Nov 2021 22:20:43 +0200 Subject: [PATCH 08/19] step8 completed --- javascript-basics-01/Step_8.html | 1 + javascript-basics-01/Step_8.html + Step_8.js | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 javascript-basics-01/Step_8.html + Step_8.js diff --git a/javascript-basics-01/Step_8.html b/javascript-basics-01/Step_8.html index 75804e8..fa0f56e 100644 --- a/javascript-basics-01/Step_8.html +++ b/javascript-basics-01/Step_8.html @@ -3,6 +3,7 @@ Step 8 + diff --git a/javascript-basics-01/Step_8.html + Step_8.js b/javascript-basics-01/Step_8.html + Step_8.js new file mode 100644 index 0000000..199f869 --- /dev/null +++ b/javascript-basics-01/Step_8.html + Step_8.js @@ -0,0 +1,8 @@ +var age=prompt("enter your age"); +function result(){ + if (age>18){ + alert("you are over 18 "); + } + else alert("you are under 18"); +} +result(); \ No newline at end of file From b61c1c59c649e4d0aef44048f8c4603f2a126797 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Thu, 25 Nov 2021 20:00:42 +0200 Subject: [PATCH 09/19] step1 02 completed --- javascript-basics-02/step 1/Step_1.js | 18 ++++++++++++++++++ javascript-basics-02/step 1/index.html | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 javascript-basics-02/step 1/Step_1.js diff --git a/javascript-basics-02/step 1/Step_1.js b/javascript-basics-02/step 1/Step_1.js new file mode 100644 index 0000000..bc944dc --- /dev/null +++ b/javascript-basics-02/step 1/Step_1.js @@ -0,0 +1,18 @@ +var pic=document.querySelector("#image1"); +pic.addEventListener('mouseover',ChangeImage); +pic.addEventListener('mouseout',ReturnImage); + +function ChangeImage(){ + image = document.getElementById('image1'); + image.src=('images/image1_2.jpg'); + + +} +function ReturnImage(){ + image = document.getElementById('image1'); + image.src=('images/image1.jpg'); + + +} + + diff --git a/javascript-basics-02/step 1/index.html b/javascript-basics-02/step 1/index.html index 5ad09a6..6def271 100644 --- a/javascript-basics-02/step 1/index.html +++ b/javascript-basics-02/step 1/index.html @@ -3,8 +3,10 @@ Step 1 + + From 25579b1f637eabb21fc4febe55b27143cb560ed3 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Thu, 25 Nov 2021 20:43:54 +0200 Subject: [PATCH 10/19] step2 02 completed --- javascript-basics-02/step 2/Step_2.js | 6 ++++++ javascript-basics-02/step 2/index.html | 1 + 2 files changed, 7 insertions(+) create mode 100644 javascript-basics-02/step 2/Step_2.js diff --git a/javascript-basics-02/step 2/Step_2.js b/javascript-basics-02/step 2/Step_2.js new file mode 100644 index 0000000..bce522c --- /dev/null +++ b/javascript-basics-02/step 2/Step_2.js @@ -0,0 +1,6 @@ +var inp=document.querySelector("#name"); +inp.addEventListener("blur",unfocuse); +function unfocuse(){ + document.getElementById('name'); + alert("thank you for participating!"); +} \ No newline at end of file diff --git a/javascript-basics-02/step 2/index.html b/javascript-basics-02/step 2/index.html index cf25790..38b7b48 100644 --- a/javascript-basics-02/step 2/index.html +++ b/javascript-basics-02/step 2/index.html @@ -9,4 +9,5 @@ + From 32f1176893e10e3b61ef5ae41562c4774ff79619 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Fri, 26 Nov 2021 10:23:10 +0200 Subject: [PATCH 11/19] step3 02 completed --- javascript-basics-02/step 3/Step_3.js | 8 ++++++++ javascript-basics-02/step 3/index.html | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 javascript-basics-02/step 3/Step_3.js diff --git a/javascript-basics-02/step 3/Step_3.js b/javascript-basics-02/step 3/Step_3.js new file mode 100644 index 0000000..ddf73c2 --- /dev/null +++ b/javascript-basics-02/step 3/Step_3.js @@ -0,0 +1,8 @@ +var inp=document.querySelector("#name"); +var d=document.querySelector("#di"); +inp.addEventListener("input",ind); +function ind(){ + inp = document.getElementById('name') + d = document.getElementById('di'); + d.innerHTML = inp.value; +} \ No newline at end of file diff --git a/javascript-basics-02/step 3/index.html b/javascript-basics-02/step 3/index.html index 308c0b8..93c9a17 100644 --- a/javascript-basics-02/step 3/index.html +++ b/javascript-basics-02/step 3/index.html @@ -7,6 +7,8 @@
+
+ From b9762ab39780f6772fb1bd3ccaa370e538fcae10 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Fri, 26 Nov 2021 11:07:10 +0200 Subject: [PATCH 12/19] step4 02 completed --- javascript-basics-02/step 4/Step_4.js | 7 +++++++ javascript-basics-02/step 4/index.html | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 javascript-basics-02/step 4/Step_4.js diff --git a/javascript-basics-02/step 4/Step_4.js b/javascript-basics-02/step 4/Step_4.js new file mode 100644 index 0000000..a014a71 --- /dev/null +++ b/javascript-basics-02/step 4/Step_4.js @@ -0,0 +1,7 @@ +function fun(){ + var answer = window.confirm("clear the form?"); +if (answer) { + document.getElementById("frm").reset(); +} + +} \ No newline at end of file diff --git a/javascript-basics-02/step 4/index.html b/javascript-basics-02/step 4/index.html index f5086df..8ada41a 100644 --- a/javascript-basics-02/step 4/index.html +++ b/javascript-basics-02/step 4/index.html @@ -5,11 +5,12 @@ Step 4 -
+ - +
+ From 5bae8dedce0822140b2431ad2bbcfd6de7529260 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Fri, 26 Nov 2021 15:48:45 +0200 Subject: [PATCH 13/19] step5 02 completed --- javascript-basics-02/step 5/Step_5.js | 14 ++++++++++++++ javascript-basics-02/step 5/index.html | 14 +++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 javascript-basics-02/step 5/Step_5.js diff --git a/javascript-basics-02/step 5/Step_5.js b/javascript-basics-02/step 5/Step_5.js new file mode 100644 index 0000000..8a4f36d --- /dev/null +++ b/javascript-basics-02/step 5/Step_5.js @@ -0,0 +1,14 @@ +function changeImage(){ + document.getElementById('image1').src = "images/image1_2.jpg"; + document.getElementById('image2').src = "images/image2_2.jpg"; + document.getElementById('image3').src = "images/image3_2.jpg"; + document.getElementById('image4').src = "images/image4_2.jpg"; + document.getElementById('image5').src = "images/image5_2.jpg"; +} +function returnImage(){ + document.getElementById('image1').src = "images/image1.jpg"; + document.getElementById('image2').src = "images/image2.jpg"; + document.getElementById('image3').src = "images/image3.jpg"; + document.getElementById('image4').src = "images/image4.jpg"; + document.getElementById('image5').src = "images/image5.jpg"; +} \ No newline at end of file diff --git a/javascript-basics-02/step 5/index.html b/javascript-basics-02/step 5/index.html index fe14eb9..c892e56 100644 --- a/javascript-basics-02/step 5/index.html +++ b/javascript-basics-02/step 5/index.html @@ -3,14 +3,18 @@ Step 5 +
- - - - - + + + + +
+ + + From 283e26d732143b4ce0fed54c83039093a69f0a9c Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Fri, 26 Nov 2021 15:54:31 +0200 Subject: [PATCH 14/19] step6 02 completed --- javascript-basics-02/step 6/Step_6.js | 14 ++++++++++++++ javascript-basics-02/step 6/index.html | 11 ++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 javascript-basics-02/step 6/Step_6.js diff --git a/javascript-basics-02/step 6/Step_6.js b/javascript-basics-02/step 6/Step_6.js new file mode 100644 index 0000000..8a4f36d --- /dev/null +++ b/javascript-basics-02/step 6/Step_6.js @@ -0,0 +1,14 @@ +function changeImage(){ + document.getElementById('image1').src = "images/image1_2.jpg"; + document.getElementById('image2').src = "images/image2_2.jpg"; + document.getElementById('image3').src = "images/image3_2.jpg"; + document.getElementById('image4').src = "images/image4_2.jpg"; + document.getElementById('image5').src = "images/image5_2.jpg"; +} +function returnImage(){ + document.getElementById('image1').src = "images/image1.jpg"; + document.getElementById('image2').src = "images/image2.jpg"; + document.getElementById('image3').src = "images/image3.jpg"; + document.getElementById('image4').src = "images/image4.jpg"; + document.getElementById('image5').src = "images/image5.jpg"; +} \ No newline at end of file diff --git a/javascript-basics-02/step 6/index.html b/javascript-basics-02/step 6/index.html index 2eecf4f..0d917e1 100644 --- a/javascript-basics-02/step 6/index.html +++ b/javascript-basics-02/step 6/index.html @@ -5,10 +5,11 @@ Step 6 - - - - - + + + + + + From 398101161e4e23fc7b6837245cef7a6143231cb8 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Sat, 27 Nov 2021 11:43:47 +0200 Subject: [PATCH 15/19] step1 03 completed --- javascript-basics-03/step 1/Step_1.js | 4 ++++ javascript-basics-03/step 1/index.html | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 javascript-basics-03/step 1/Step_1.js diff --git a/javascript-basics-03/step 1/Step_1.js b/javascript-basics-03/step 1/Step_1.js new file mode 100644 index 0000000..53d59a0 --- /dev/null +++ b/javascript-basics-03/step 1/Step_1.js @@ -0,0 +1,4 @@ +function bord(){ + var pic = document.getElementById("image1"); + pic.style["border"] = "3px solid red"; +} \ No newline at end of file diff --git a/javascript-basics-03/step 1/index.html b/javascript-basics-03/step 1/index.html index eb4909d..7734802 100644 --- a/javascript-basics-03/step 1/index.html +++ b/javascript-basics-03/step 1/index.html @@ -5,6 +5,7 @@ Step 1 - + + From 96df824425de924ca4a28b29fbf6dd3b95e9dbeb Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Sat, 27 Nov 2021 15:07:18 +0200 Subject: [PATCH 16/19] step2 03 completed --- javascript-basics-03/step 2/Step_2.js | 7 +++++++ javascript-basics-03/step 2/index.html | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 javascript-basics-03/step 2/Step_2.js diff --git a/javascript-basics-03/step 2/Step_2.js b/javascript-basics-03/step 2/Step_2.js new file mode 100644 index 0000000..18139f3 --- /dev/null +++ b/javascript-basics-03/step 2/Step_2.js @@ -0,0 +1,7 @@ +function fun(nbr) { + if (nbr === 2) { + document.getElementById('texte').style.display = "none"; + } else { + document.getElementById('texte').style.display = "block"; + } +} \ No newline at end of file diff --git a/javascript-basics-03/step 2/index.html b/javascript-basics-03/step 2/index.html index aeff7fa..315c59b 100644 --- a/javascript-basics-03/step 2/index.html +++ b/javascript-basics-03/step 2/index.html @@ -5,10 +5,11 @@ Step 2 -Show -Hide -
+Show +Hide +

Joseph Dacre Carlyle (Carlisle, 4 juin 1758 - Newcastle upon Tyne, 12 avril 1804) est un orientaliste anglais.Après ses études à l'université de Cambridge, il y devint professeur d'arabe. En 1799, il fut attaché par le gouvernement britannique à l'ambassade de Lord Elgin dans l'Empire ottoman. Il était chargé d'explorer les bibliothèques de la région (principalement celle du Sérail) pour y découvrir (et y acquérir) des manuscrits inédits de textes antiques. Il se rendit aussi en Égypte, en Terre sainte et au mont Athos. Sa mission fut, de son point de vue, un échec. Il acheta quelques centaines d'ouvrages, principalement dans les bazars de Constantinople, mais aucun ne contenait de texte inédit. Cependant, la façon dont certains manuscrits avaient été acquis, principalement ceux du patriarche de Jérusalem Anthème Ier, ainsi que la querelle entamée sur la plaine de Troie entre Carlyle et un autre professeur de Cambridge, Edward Daniel Clarke, allaient être utilisées, après la mort de Carlyle, contre Lord Elgin, dans les controverses autour de l'acquisition des « marbres d'Elgin ».De retour en Grande-Bretagne à l'automne 1801, Joseph Dacre Carlyle entama une traduction en arabe de la Bible. Sa mort en avril 1804 coupa court à ce travail.

+ From ee81c284f514e6238f68f3495da34dea05df0be9 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Sat, 27 Nov 2021 15:22:48 +0200 Subject: [PATCH 17/19] step3 03 completed --- javascript-basics-03/step 3/Step_3.js | 11 +++++++++++ javascript-basics-03/step 3/index.html | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 javascript-basics-03/step 3/Step_3.js diff --git a/javascript-basics-03/step 3/Step_3.js b/javascript-basics-03/step 3/Step_3.js new file mode 100644 index 0000000..db12609 --- /dev/null +++ b/javascript-basics-03/step 3/Step_3.js @@ -0,0 +1,11 @@ +function fun(nbr){ + if (nbr===1){ + document.getElementById('text').style.color="green"; + } + if (nbr===2){ + document.getElementById('text').style.color="red"; + } + if (nbr===3){ + document.getElementById('text').style.color="blue"; + } +} \ No newline at end of file diff --git a/javascript-basics-03/step 3/index.html b/javascript-basics-03/step 3/index.html index 0db3888..e0ea240 100644 --- a/javascript-basics-03/step 3/index.html +++ b/javascript-basics-03/step 3/index.html @@ -10,9 +10,10 @@

Tara, originellement nommée Antarctica puis Seamaster, est une goélette française destinée à la fois à l'exploration et à la défense de l'environnement. Dans le cadre de l'Année polaire internationale, en 2007-2008, ce voilier est utilisé en Arctique par l'expédition Tara Arctic dans le but de faire des relevés permettant de mieux comprendre les changements climatiques qui s'opèrent en Arctique. En 2009, dans le cadre de l'expédition Tara Oceans, Tara parcourt les mers et les océans dans une circumnavigation de trois ans afin d'étudier le piégeage des molécules de gaz carbonique (CO2) par les micro-organismes marins comme le plancton. En avril 2016, une nouvelle expédition est montée Tara Pacific dont l'objectif est de comprendre le corail, menacé par des facteurs humains et climatiques1.

-
-
-
+
+
+
+ From dca4095c7032922e3e10d34c76adf1a3af46ce63 Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Sat, 27 Nov 2021 17:37:50 +0200 Subject: [PATCH 18/19] step4 03 completed --- javascript-basics-03/step 4/Step_4.js | 13 +++++++++++++ javascript-basics-03/step 4/index.html | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 javascript-basics-03/step 4/Step_4.js diff --git a/javascript-basics-03/step 4/Step_4.js b/javascript-basics-03/step 4/Step_4.js new file mode 100644 index 0000000..ba5a9a1 --- /dev/null +++ b/javascript-basics-03/step 4/Step_4.js @@ -0,0 +1,13 @@ +function match(){ + var pass=document.getElementById('password'); + var conf=document.getElementById('confirmation'); + + if (pass.value==conf.value){ + pass.style["border"] = "3px solid green"; + conf.style["border"] = "3px solid green"; + } + else{ + pass.style["border"] = "3px solid red"; + conf.style["border"] = "3px solid red"; + } +} diff --git a/javascript-basics-03/step 4/index.html b/javascript-basics-03/step 4/index.html index cab276b..1d2b56d 100644 --- a/javascript-basics-03/step 4/index.html +++ b/javascript-basics-03/step 4/index.html @@ -8,7 +8,8 @@
- +
+ From 69edeaa4b106ce5a002203295dbcd50347a34cfa Mon Sep 17 00:00:00 2001 From: rami kadaweh Date: Sun, 28 Nov 2021 14:12:53 +0200 Subject: [PATCH 19/19] basics 04 completed --- javascript-basics-04-tdd/questions.js | 57 +++++++++++++++++---------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/javascript-basics-04-tdd/questions.js b/javascript-basics-04-tdd/questions.js index d56a923..23caf2d 100644 --- a/javascript-basics-04-tdd/questions.js +++ b/javascript-basics-04-tdd/questions.js @@ -1,101 +1,118 @@ const stringSize = (text) => { - + return text.length; } const replaceCharacterE = (text) => { - + return text.replace("e"," ") } const concatString = (text1, text2) => { - + return text1+text2; } const showChar5 = (text) => { - + return text.slice(4,5) } const showChar9 = (text) => { - + return text.slice(0,9) } const toCapitals = (text) => { - + return text.toUpperCase() } const toLowerCase = (text) => { - + return text.toLowerCase() } const removeSpaces = (text) => { - + return text.trim() } const IsString = (text) => { - + if (typeof (text) === 'string'){ + return true + } } const getExtension = (text) => { + return text.split('.').pop() } const countSpaces = (text) => { - + return text.split(" ").length - 1 } const InverseString = (text) => { - + return text.split('').reverse().join('') + } const power = (x, y) => { + return Math.pow(x,y) } const absoluteValue = (num) => { + return Math.abs(num) } const absoluteValueArray = (array) => { + return array.map(Math.abs) } const circleSurface = (radius) => { + return Math.round (Math.PI * radius * radius); } const hypothenuse = (ab, ac) => { + return Math.hypot(ab, ac) } const BMI = (weight, height) => { + return Number((weight / (height * height)).toFixed(2)) } const createLanguagesArray = () => { - + return array=["Html","CSS","Java","PHP"] } const createNumbersArray = () => { - + return array=[0,1,2,3,4,5] } const replaceElement = (languages) => { + languages.splice(2, 1, "Javascript"); + return languages; } const addElement = (languages) => { + languages.push("Ruby","Python"); + return languages; } const addNumberElement = (numbers) => { - + numbers.unshift(-2,-1); + return numbers; } const removeFirst = (languages) => { - + languages.shift(1); + return languages; } const removeLast = (languages) => { - + languages.pop(5); + return languages; } const convertStrToArr = (social_arr) => { - + return social_arr.split(',') } const convertArrToStr = (languages) => { - + return languages.toString() } const sortArr = (social_arr) => { - + return social_arr.sort() } const invertArr = (social_arr) => { - + return social_arr.reverse() } \ No newline at end of file