-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Exercice 1</title> | ||
</head> | ||
<body> | ||
<script src="exercice1.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function abracadabra() { | ||
let first_name = prompt("First name ?"); | ||
let last_name = prompt("Last name ? "); | ||
let age = prompt("Age ?"); | ||
|
||
alert("Sapristi ! On ne m'avait pas prévenu que c'était vous, " | ||
+ first_name | ||
+ " ! Euh... Je veux dire... Monsieur le grand magicien " | ||
+ last_name | ||
+ " ! Cela fait déjà ${age} ans que vous faites rayonner notre contrée !.") | ||
} | ||
|
||
abracadabra(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Exercice 2</title> | ||
</head> | ||
<body> | ||
<script src="exercice2.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function bodyMassIndex(mass, height) { | ||
// Height in meters | ||
metersHeight = Number(height) / 100; | ||
let bmi = mass / Math.pow(Number(height) / 100, 2); | ||
return bmi | ||
} | ||
|
||
let mass = prompt("Mass (kg)?"); | ||
let height = prompt("Height (cm)?") | ||
|
||
alert(bodyMassIndex(mass, height)); |