Skip to content

Instantly share code, notes, and snippets.

@asathoor
Created August 27, 2018 10:11
Show Gist options
  • Save asathoor/7479065aca04349140ad0d15d5be12c0 to your computer and use it in GitHub Desktop.
Save asathoor/7479065aca04349140ad0d15d5be12c0 to your computer and use it in GitHub Desktop.
Beregn BMI via JavaScript
<!DOCTYPE html>
<html lang="en">
<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>Document</title>
</head>
<body>
<h1>BMI beregner</h1>
<p></p>
<script>
var kg = prompt('Kg?');
var hoejde = prompt('Hoejde');
var bmi = kg / (hoejde * hoejde);
console.log(bmi);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment