Skip to content

Commit

Permalink
Introduce syntax and reference errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brook7G committed Apr 27, 2024
1 parent f40bef6 commit b89e2d5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lesson-20/lesson20.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";
//before running the whole script please comment the other lines/Programs
console.log("ERRORS AND EXCEPTIONS : PART-2");
//
console.log("");
console.log("Syntax error");
//
"use strict";
iff (true) { //-> Uncaught SyntaxError: Unexpected token '{'
console.log("true");
}
//
console.log("");
console.log("Reference Error");
//
let a = b; // -> Uncaught ReferenceError: b is not defined


0 comments on commit b89e2d5

Please sign in to comment.