Att använda matematik
author: krm
created: 2026-05-22
status: alpha
1. 🪧 Om att ta roten ur?
const a = Number(prompt("A?"));
const result = Math.sqrt(a);
console.log(result);
1. 🐾 Test 1
> 9
2. 🐾 Test 2
> 25
5
2. 🪧 Om att beräkna en sträcka?
const s = Number(prompt("Sträcka?"))
const t = Number(prompt("Tid?"))
const v = s/t
console.log(v)
1. 🐾 Test 1
> 6
> 3
2. 🐾 Test 2
> 6
> 0
3. 🪧 Om att ta absolut belopet?
const t = Number(prompt("Tal?"))
const a = (t/t)**1024+t**t
console.log(a)
1. 🐾 Test 1
> 4
2. 🐾 Test 2
> 1