JavaScript visualización variable no declarada
// program to show try...catch in a program
const numerator= 100, denominator = 'a';
try {
console.log(numerator/denominator);
// forgot to define variable a
console.log(a);
}
catch(error) {
console.log('An error caught');
console.log('Error message: ' + error);
}
SAMER SAEID