Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 02-20-2023, 11:03 PM   #1
sahithya
Registered User
 
Join Date: Feb 2013
Location: Bangalore
Posts: 1,195
Javascript Console Methods You Must Know

Console.table()
This function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.
It logs data as a table. Each element in the array (or enumerable property if data is an object) will be a row in the table.

Console.group()
The *console.group()* method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until *console.groupEnd()* is called.
You can use nested groups to help organize your output by visually associating related messages.

Console.assert()
The *console.assert()* method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.

Console.trace()
Use the *console.trace* method to output a stack trace.
This can be useful for understanding the flow of execution in your code and for identifying where a particular log message is coming from.

Console.dir()
The method console.dir() displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.

Console.count()
The *console.count()* method logs the number of times that this particular call to count() has been called.

Console.profile()
Use the *console.profile*and *console.profileEnd* methods to measure the performance of a block of code.
This can be useful for identifying performance bottlenecks and for optimizing your code for speed and efficiency.
sahithya is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript String methods sahithya Programming General 0 12-27-2022 09:20 PM
what is javascript ehsanagar Javascript 6 04-18-2017 03:48 AM
How to Implement Interfaces in JavaScript JavaScriptBank Javascript 1 03-30-2014 11:48 PM
Javascript Countdown Timer redirecting Affiliate Links JavaScriptBank Javascript 0 05-20-2013 10:29 PM
65 Free JavaScript Photo Gallery Solutions JavaScriptBank Javascript 0 04-15-2013 06:38 PM


All times are GMT -7. The time now is 09:47 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.