From d6b1a7121b819c0566eb5fed24224563d455e64e Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Mon, 9 Jan 2017 19:05:11 +0200 Subject: [PATCH] use assignment operators --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d4b76f8c..43fd39cb 100644 --- a/README.md +++ b/README.md @@ -921,7 +921,7 @@ class BankAccount { const bankAccount = new BankAccount(); // Buy shoes... -bankAccount.balance = bankAccount.balance - 100; +bankAccount.balance -= 100; ``` **Good**: @@ -1997,7 +1997,7 @@ function hashIt(data) { // Make the hash hash = ((hash << 5) - hash) + char; // Convert to 32-bit integer - hash = hash & hash; + hash &= hash; } } ``` @@ -2014,7 +2014,7 @@ function hashIt(data) { hash = ((hash << 5) - hash) + char; // Convert to 32-bit integer - hash = hash & hash; + hash &= hash; } }