Declare an array in TypeScript
09:16 10 Aug 2016

I'm having trouble either declaring or using a boolean array in Typescript, not sure which is wrong. I get an undefined error. Am I supposed to use JavaScript syntax or declare a new Array object?

Which one of these is the correct way to create the array?

private columns = boolean[];
private columns = [];
private columns = new Array();

How would I initialise all the values to be false?

How would I access the values, can I access them like, columns[i] = true;?

javascript arrays typescript