Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 41ada9e

Browse files
watildecaridy
authored andcommitted
Replace for-in with basic for loop in FormatNumber (#177)
1 parent e150378 commit 41ada9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/11.numberformat.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ export function FormatNumber(numberFormat, x) {
704704
// 2. Let result be an empty String.
705705
let result = '';
706706
// 3. For each part in parts, do:
707-
for (let idx in parts) {
708-
let part = parts[idx];
707+
for (let i = 0; parts.length > i; i++) {
708+
let part = parts[i];
709709
// a. Set result to a String value produced by concatenating result and part.[[value]].
710710
result += part['[[value]]'];
711711
}

0 commit comments

Comments
 (0)