console.log()
Try it yourself →Writes the value to the console (same as JS).
Syntax
console.log(value)
Description
TypeScript is a superset of JavaScript; all JS commands work. console.log writes to the output.
Example
console.log("Hello TypeScript");Expected output
Hello TypeScript
When to use?
Showing results, debugging.