Skip to content

Commit d8ca625

Browse files
feat: add console.error()
1 parent e856442 commit d8ca625

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

part1 (Basics)/05_printing.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ console.table({ city: "Islamabad" });
1818
// - Prints warning messages, usually highlighted in the console.
1919
console.warn({ city: "newCity" });
2020

21+
// 5. console.error()
22+
// - Prints error messages, usually highlighted in the console
23+
console.error("The error message");
24+
2125
/*
2226
Note:
2327
- In browsers, `console.log()`, `console.warn()`, and `console.table()` are commonly used.

0 commit comments

Comments
 (0)