This is my second blog on this topic and in this we will talk in some advance topic which are lesser known (I think) by beginners.
- count ⇾ it places a counter on the object value provided as argument. Each time value is appeared in count, counting is increased (“exception is empty string which do not contains label”).
[label] : X
2. trace ⇾ it outputs the current stack trace or display the same output as console.log if invoked in the global scope. This method is very useful in tracing the recursion.
Bonus Method time ⇾ console.time can be used to measure how long a task took, it start a new timer identified by label which is accepted through argument.timeEnd ⇾ it shows the elapsed time in millisecond for that label. We may use it to notice the execution time of an algorithm. timeEnd takes same label as argument which time took.
Thanks a lot to read till last, leave a clap and relevant comment.