Devlog - 2025-10-24
π What I Did
- Math methods.
- Fortune teller using js.
π§ What I Learned
- Type Coersion - when a value of one data type is converted to another.
const subtractionResult = '10' - 5;
console.log(subtractionResult); // 5
console.log(typeof subtractionResult); // number
const multiplicationResult = '10' * 2;
console.log(multiplicationResult); // 20
console.log(typeof multiplicationResult); // number
const divisionResult = '20' / 2;
console.log(divisionResult); // 10
console.log(typeof divisionResult); // number
- Treats true as 1 and false as 0 during arithmetic operations.
π₯ Whatβs Next
- More js.
| β Previous | Next β |