Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "no-ops" mean in Javascript [closed]

Tags:

javascript

I'm looking at Mozilla scope cheat sheet and it states:

var

  • function-scoped
  • hoist to the top of its function
  • redeclarations of the same name in the same scope are no-ops

I can't find any reference to the definition of "no-ops"? What does it mean? Does it mean "no operation", meaning it doesn't redeclare it, simply changes the value?

like image 970
Mark Robson Avatar asked May 20 '26 13:05

Mark Robson


1 Answers

A no op (or no-op), 'for no operation', is a computer instruction that takes up a small amount of space but specifies no operation. The computer processor simply moves to the next sequential instruction.

redeclarations of the same name in the same scope are no-ops

If there is a re-declaration, then the instruction will simply be skipped.. i.e. it wont be redeclared.

enter image description here

Red : Step skipped.

like image 123
Himanshu Tyagi Avatar answered May 22 '26 02:05

Himanshu Tyagi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!