Console.log javascript example
- how to use console in javascript
- how to use console table in javascript
- how to use console error in javascript
- how to use console in chrome for javascript
Console.log javascript
Console.log javascript with variable...
Console in JavaScript
The console object provides access to the browser’s debugging console (or terminal in Node.js). It is used to log information, debug code, and interact with the runtime environment during development.
Commonly Used console Methods
Here are the most frequently used methods of the console object:
1.
console.log()
The console.log() function logs general information to the console.
2. console.error()
The console .error() Typically displayed in red. It is used to display an error message on the console.
console .error()
3.Types of console in javascript
console .warn()
The console. warn() function Logs warnings on to the console to warn the user about certain scenarios, typically displayed in yellow.
console. warn()
4. console.info()
The console.info() logs informational messages, which usually appear as standard logs but can be styled differently in some environments.
Using the %c flag and passing the style object as the second parameter to the function can be used to style the info message.
console.info()
5. console .table()
console.table() is a method that displa
- how to take console input in javascript
- how to use javascript console in vs code