Created
June 13, 2019 12:19
-
-
Save matthieua/f5b117666a8ca0031d94aa735d6bbdfc to your computer and use it in GitHub Desktop.
math
This file contains hidden or 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
<html> | |
<head> </head> | |
<body> | |
<h1>Math</h1> | |
<script> | |
let temperature = 19.7; | |
temperature = Math.round(temperature); | |
console.log(temperature); | |
let morningTemperature = 11; | |
let eveningTemperature = 10; | |
let minimumTemperature = Math.min(morningTemperature, eveningTemperature); | |
console.log(minimumTemperature); | |
let maximumTemperature = Math.max(morningTemperature, eveningTemperature); | |
console.log(maximumTemperature); | |
console.log( | |
`Here is a random number between 0 and 100: ${Math.round( | |
Math.random() * 100 | |
)}` | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment