2 ms·
That's because Javascript doesn't print out the shortest possible output. OP's requirement is that the output for 0.1 + 0.11 is displayed as 0.21, and that the
by jancsika 8y ago
That's because Javascript doesn't print out the shortest possible output.
OP's requirement is that the output for 0.1 + 0.11 is displayed as 0.21, and that the output survives a round-trip. Your example satisfies the latter but not the former.