JS Built-ins
consoleintermediate

console β€” count is a function

πŸ“– Usage Example
const arr = [1, 2, 3]
console.assert(arr.length > 0, 'Array is empty')

console.assert() is handy for verifying array state without throwing.

console.count()

console.count(label) logs how many times it has been called with that label.

Challenge: Verify that console.count is a function.

πŸ’‘ Hints (1)
  • β€’ console.count tracks invocation count by label