Assertions
An assertion checks a condition at runtime and traps if it fails.
let n = 10;assert n % 2 == 1; // Trapslet n = 10;assert n % 2 == 0; // SucceedsAssertions help catch logic errors early, but should not be used for regular error handling.