mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
use .fill to initialise Arrays
This commit is contained in:
@@ -713,13 +713,9 @@ const IP = {
|
||||
ip2 = IP._strToIpv6(range[14]);
|
||||
|
||||
let t = "",
|
||||
total = new Array(128),
|
||||
total = new Array(128).fill(),
|
||||
i;
|
||||
|
||||
// Initialise total array to "0"
|
||||
for (i = 0; i < 128; i++)
|
||||
total[i] = "0";
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
t = (ip2[i] - ip1[i]).toString(2);
|
||||
if (t !== "0") {
|
||||
|
||||
Reference in New Issue
Block a user