Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bitwise logical AND operator ( & ) in Java Script

 
auvrm papu
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a bitwise logical AND operator ( & ) in Java Script.

For example:
if ((x & (x − 1)) == 0){

}
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Writing a test page or a simple Google Search would have gave you the answer:
http://www.google.com/search?q=JavaScript+bit+operators

Eric
 
auvrm papu
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Eric..

I did try..before..and got an error..so I just wanted to verify...
just figured out that I had some other issues ...in the paranthesis..!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again? Please see my response to your other post regarding the mod operator.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic