Question: I want to create a log file whilst my script extracts 7z

I'm using the following:

```
7z x "*.7z" >> logfile.log 2>&1

```

But terminal stops displaying output and the log file is blank...

Answer: 
`doors[k] % j` is nonsense (`"Closed" % 1`).

`k % j == 0` will be true for the 0-th door, always. Use `(k + 1) % j` to trigger 2nd, 5th, 8th (i.e. #3, #6, #9 in English)... when `j` is `3`.

While it's not an error, it would be easier if you had just Boolean values in the array: say, `false` for closed, `true` for open. Then toggling is just `doors[value] = !doors[value]`. Transform to strings at output, as `"Closed"` and `"Open"` are only relevant to humans.
This is how I solved this problem. I think you dont need "closed" or "open". Instead try to use booleans(true or false) instead.

```js

function getFinalOpenedDoors(numDoors) {
const array=[];
for(let i=1; i<101;i++){
  array[i]=false
}
let turn=1
while(turn<=100){
  for(let i=turn; i<101;i++){
    if(i%turn===0){
    array[i]=!array[i]
    }
  }
  turn=turn+1
}

const container=[]

for(let j=0;j<array.length;j++){
  if(array[j]===true)
  container.push(j)
}

return container

}

getFinalOpenedDoors(100)

```