Click here to Skip to main content
15,891,749 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How to compute XOR logic? Pin
Kornfeld Eliyahu Peter19-Jun-16 23:37
professionalKornfeld Eliyahu Peter19-Jun-16 23:37 
AmalRaj@Sync wrote:
I could not exactly compute the proper result
I assume you got 1 as the two operands of XOR are different, but What have you expect?

XOR (^) is a bitwise operator, so assigning it on other types (like Boolean or String) can have interesting results. The reason of course is how type casting is done...
For instance "hello" ^ "word" will return 0 (both operands are the same?), the reason is that both operands are converted to numeric and yielded NaN...and NaN is the same as NaN...

As in your sample true converted to 1 and false to 0, so 1 ^ 0 yields 1...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.

AnswerRe: How to compute XOR logic? Pin
Richard Deeming20-Jun-16 1:50
mveRichard Deeming20-Jun-16 1:50 
QuestionLooking for tutorial or code to learn from, display only certain XML records Pin
bulrush40010-Jun-16 3:29
bulrush40010-Jun-16 3:29 
AnswerRe: Looking for tutorial or code to learn from, display only certain XML records Pin
John C Rayan14-Jun-16 4:55
professionalJohn C Rayan14-Jun-16 4:55 
Questionhow to hide web browser toolbar and show web page with fullscreen Pin
njzt3-Jun-16 5:39
njzt3-Jun-16 5:39 
AnswerRe: how to hide web browser toolbar and show web page with fullscreen Pin
Richard Deeming3-Jun-16 7:14
mveRichard Deeming3-Jun-16 7:14 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
njzt3-Jun-16 18:33
njzt3-Jun-16 18:33 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
njzt6-Jun-16 1:55
njzt6-Jun-16 1:55 
GeneralRe: how to hide web browser toolbar and show web page with fullscreen Pin
Richard Deeming6-Jun-16 4:25
mveRichard Deeming6-Jun-16 4:25 
QuestionNeed simple "Revert To Saved" Javascript code for fillable PDF Pin
Member 125622572-Jun-16 9:00
Member 125622572-Jun-16 9:00 
SuggestionRe: Need simple "Revert To Saved" Javascript code for fillable PDF Pin
Richard MacCutchan2-Jun-16 21:43
mveRichard MacCutchan2-Jun-16 21:43 
QuestionRunning XMLHttpRequest in Firefox gives no results at all Pin
bulrush40025-May-16 8:59
bulrush40025-May-16 8:59 
AnswerRe: Running XMLHttpRequest in Firefox gives no results at all Pin
ZurdoDev25-May-16 10:25
professionalZurdoDev25-May-16 10:25 
SuggestionRe: Running XMLHttpRequest in Firefox gives no results at all Pin
Richard Deeming25-May-16 10:35
mveRichard Deeming25-May-16 10:35 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
bulrush40026-May-16 0:36
bulrush40026-May-16 0:36 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
Richard Deeming26-May-16 1:46
mveRichard Deeming26-May-16 1:46 
GeneralRe: Running XMLHttpRequest in Firefox gives no results at all Pin
bulrush40010-Jun-16 3:10
bulrush40010-Jun-16 3:10 
QuestionI am not sure why this controller is not firing in this AngularJS script, any help Pin
indian14321-May-16 4:05
indian14321-May-16 4:05 
AnswerRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
Karthik_Mahalingam21-May-16 19:49
professionalKarthik_Mahalingam21-May-16 19:49 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
Karthik_Mahalingam22-May-16 0:31
professionalKarthik_Mahalingam22-May-16 0:31 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
indian14322-May-16 0:38
indian14322-May-16 0:38 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
Karthik_Mahalingam22-May-16 0:39
professionalKarthik_Mahalingam22-May-16 0:39 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
indian14322-May-16 0:49
indian14322-May-16 0:49 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
indian14322-May-16 0:46
indian14322-May-16 0:46 
GeneralRe: I am not sure why this controller is not firing in this AngularJS script, any help Pin
Karthik_Mahalingam22-May-16 0:51
professionalKarthik_Mahalingam22-May-16 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.