Att använda logik
author: krm
created: 2026-05-22
status: alpha
1. 🪧 Och, och och och?
const a = prompt("Answer y");
const b = prompt("Answer y");
const result = a === "y" && b === "y";
console.log(result);
1. 🐾 Test 1
> y
> y
2. 🐾 Test 2
> y
> n
3. 🐾 Test 3
> n
> y
4. 🐾 Test 4
> n
> n
2. 🪧 Inte, och och eller?
const a = prompt("Answer y");
const b = prompt("Answer y");
const A = a === "y";
const B = b === "y";
const result = !((A || B) && (A || B));
console.log(result);
1. 🐾 Test 1
> y
> y
2. 🐾 Test 2
> y
> n
3. 🐾 Test 3
> n
> y
4. 🐾 Test 4
> n
> n