Initialize boolean array as all true Unity JS

How do I Initialize boolean array as all true in JS … ?

public var terroristShooting : boolean[] = new boolean[10];

A for next loop really would be the fastest - I haven’t tested it but you could probably do it with Linq:

    import System.Linq;

    var terroristShooting = Enumerable.Range(0,10).Select(function(c) true).ToArray();

for (var ts in terroristShooting) ts = true;

If you do it a lot, you could make your own function which makes a boolean array and fills it with true:

public var terroristShooting : boolean[] = BooleanArrayTrue(10);

function BooleanArrayTrue (size : int) : boolean[] {
    var boolArray = new boolean;
    for (var b in boolArray) b = true;
    return boolArray;