Understand the Hazards of Using Imperative Code not working

Tell us what’s happening:
What it saying ? what tabs?
Your code so far

var tabsAfterIndex = this.tabs.splice(index);
var tabsAfterIndex = this.tabs.splice(1);

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13729.72.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.116 Safari/537.36.

Challenge: Understand the Hazards of Using Imperative Code

Link to the challenge:

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.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.