tabs is an array of strings. It’s named tabs because it emulates tabs on a “browser” (we’re just imagining that variable Window is a browser). The task is to implement the tabClose function correctly so the right tab, specified by its index, is removed from the array.
Your code repeats the declaration of variable tabsAfterIndex. I suspect you meant one of them to be tabsBeforeIndex.