From 845e3dd4087b007d62a3c0aac86f5f9bf90c8f8a Mon Sep 17 00:00:00 2001 From: Danny V Date: Sun, 31 Oct 2021 09:39:49 +0200 Subject: [PATCH] added numeric separator feature note --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 631db6e8..147f74ba 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,15 @@ const MILLISECONDS_PER_DAY = 60 * 60 * 24 * 1000; //86400000; setTimeout(blastOff, MILLISECONDS_PER_DAY); ``` +_Note: depending on context using multiply can hit performance. Most modern browsers are now support numeric separator feature which allows to do the following:_ + +```javascript +const MILLISECONDS_PER_DAY = 86_400_000; //86400000; + +setTimeout(blastOff, MILLISECONDS_PER_DAY); +``` +More info can be found here: https://caniuse.com/mdn-javascript_grammar_numeric_separators + **[⬆ back to top](#table-of-contents)** ### Use explanatory variables