File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes bitwise logical AND operator ( & ) in Java Script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "bitwise logical AND operator ( & ) in Java Script" Watch "bitwise logical AND operator ( & ) in Java Script" New topic
Author

bitwise logical AND operator ( & ) in Java Script

auvrm papu
Ranch Hand

Joined: Sep 01, 2005
Posts: 105
Is there a bitwise logical AND operator ( & ) in Java Script.

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

}
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Sep 01, 2005
Posts: 105
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

Again? Please see my response to your other post regarding the mod operator.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bitwise logical AND operator ( & ) in Java Script