Where does the clear() method reside?
clear()
is a method of the console
object just like log()
. console.log()
, console.clear()
work as expected but only writing clear()
also works without prefixing with the object where it lives.
It seems like the clear()
method also lives on the global object window
. But I can’t find it in the window
object.
Where does clear() method reside?
clear()
is a method of the console
object just like log()
. console.log()
, console.clear()
work as expected but only writing clear()
also works without prefixing with the object where it lives.
It seems like the clear()
method also lives on the global object window
. But I can’t find it in the window
object.