Skip to content

Commit d6b1a71

Browse files
committed
use assignment operators
1 parent 907617b commit d6b1a71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ class BankAccount {
921921
const bankAccount = new BankAccount();
922922

923923
// Buy shoes...
924-
bankAccount.balance = bankAccount.balance - 100;
924+
bankAccount.balance -= 100;
925925
```
926926

927927
**Good**:
@@ -1997,7 +1997,7 @@ function hashIt(data) {
19971997
// Make the hash
19981998
hash = ((hash << 5) - hash) + char;
19991999
// Convert to 32-bit integer
2000-
hash = hash & hash;
2000+
hash &= hash;
20012001
}
20022002
}
20032003
```
@@ -2014,7 +2014,7 @@ function hashIt(data) {
20142014
hash = ((hash << 5) - hash) + char;
20152015

20162016
// Convert to 32-bit integer
2017-
hash = hash & hash;
2017+
hash &= hash;
20182018
}
20192019
}
20202020

0 commit comments

Comments
 (0)