In JavaScript, a variable declared without the var, let, or const keyword inside a function becomes a property of the ________ object.

  • "window"
  • "global"
  • "local"
  • "this"
In JavaScript, a variable declared without the var, let, or const keyword inside a function becomes a property of the "global" object. This can lead to unexpected behavior, so it's important to declare variables properly.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *