2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-10 13:23:25 +00:00

use .fill to initialise Arrays

This commit is contained in:
Thomas Grainger
2017-04-13 18:43:38 +01:00
parent d41d56e670
commit 5b03a84be8
3 changed files with 3 additions and 14 deletions

View File

@@ -397,9 +397,7 @@ const StrUtils = {
}
// Initialise output strings
for (s = 0; s < samples.length; s++) {
outputs[s] = "";
}
outputs.fill("", 0, samples.length);
// Loop through each character in the first sample
for (i = 0; i < samples[0].length; i++) {