Race Result Details |
Racer | Swadhin Gyanajyoti (gyanajyoti) |
Race Number | 2 |
Date | Sun, 5 Jan 2025 14:17:23 |
Universe | code |
Speed |
34 WPM
![]() |
Accuracy | 93.6% |
Rank | 3rd place (out of 3) |
Text typed:
function calculateArea(width, height) {
try {
var area = width * height;
if (!isNaN(area)) {
return area;
} else {
throw new Error('calculateArea() received invalid number');
}
} catch(e) {
console.log(e.name + ' ' + e.message);
return 'We were unable to calculate the area.';
}
}
—
Throw
|