HNHacker News
TopNewBestAskShowJobs

bungalilac

1 karma · joined June 26, 2021

submissionscomments
bungalilac··on ES2021 Features
x += y; x = x + y; x = y; x = x y; x ||= y; x || (x = y); // Why? // Why not x ||= y; x = x || y;?

let fee = 123_00; // $123 (12300 cents, apparently) // Why not 12300? let amount = 123_4500; // 123.45 (4-fixed financial) // Why not 1234500? // Why not just ignore those underscore and let Indians type like 3_00_00_000 // or Japaneses type like 1234_0000