Skip to content

Commit

Permalink
Merge pull request #2 from purushottam54/master
Browse files Browse the repository at this point in the history
Create method3.js
  • Loading branch information
ShingareOm committed Jul 18, 2023
2 parents b8ec70f + 698e389 commit 2f07508
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions methods/method3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let a = 5;
let b = 10;

console.log("Before swapping: a =", a, "b =", b);

a = a ^ b;
b = a ^ b;
a = a ^ b;

console.log("After swapping: a =", a, "b =", b);

0 comments on commit 2f07508

Please sign in to comment.