mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
chore: Clean up variable assignment. (#7962)
* chore: Clean up variable assignment. * fix: variable now const as a result of prev commit
This commit is contained in:
@@ -318,7 +318,7 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}(values) {
|
||||
}
|
||||
for (var j = 0; j < counts.length; j++) {
|
||||
if (counts[j][1] === maxCount) {
|
||||
modes.push(counts[j][0]);
|
||||
modes.push(counts[j][0]);
|
||||
}
|
||||
}
|
||||
return modes;
|
||||
@@ -341,7 +341,7 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}(numbers) {
|
||||
for (var j = 0; j < n; j++) {
|
||||
variance += Math.pow(numbers[j] - mean, 2);
|
||||
}
|
||||
variance = variance / n;
|
||||
variance /= n;
|
||||
return Math.sqrt(variance);
|
||||
}
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user