Skip to content

Commit 35df19a

Browse files
committed
Try Catch
1 parent 7bb52b3 commit 35df19a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

class_obj.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ porsche.start();
3434
porsche.stop();
3535
console.log(porsche);
3636
let lotus = new Car();
37-
console.log(lotus);
37+
console.log(lotus);
38+
39+
try {
40+
console.log(name);
41+
console.log(fieldName);
42+
} catch (err) {
43+
console.log(err);
44+
}

0 commit comments

Comments
 (0)