JavaScript tips — Making large numbers easier to read using numeric separators

preview_player
Показать описание
Writing a large number in #JavaScript? Use underscores to break up the number's digits without changing its value. For example: 1_000_000

These underscores (the numeric separators) can be placed anywhere within a number literal. They even work for hex and binary literals. Use whatever placement you find most clear
Рекомендации по теме
Комментарии
Автор

devs, please do this in your code! makes readability a lot better :)

FunctionGermany
join shbcf.ru