Javascript try catch statement Question 1

Introduction

What is the output of the following code?


try {/*from www. j a  v  a  2s .  c o  m*/
    for (let i = 5; i > -5; i--) {
        console.log(abc);
    }
} catch (err) {
    console.log("There was an error: " + err.message);
} finally {
    console.log("You should see this text regardless.");
}


There was an error: abc is not defined
You should see this text regardless.



PreviousNext

Related