text: var Window = function (tabs) {
      this.tabs = tabs; // We keep a record of the array inside the object
  };
  Window.prototype.join = function (otherWindow) {
      this.tabs = this.tabs.concat(otherWindow.tabs);
      return this;
  };
  Window.prototype.tabOpen = function (tab) {
      this.tabs.push('new tab'); // Let's open a new tab for now
      return this;
  };
  Window.prototype.tabClose = function (index) {
      // Only change code below this line
      /* var tabsBeforeIndex = this.tabs.splice(0, index); // Get the tabs before the tab
      var tabsAfterIndex = this.tabs.splice(index + 1); // Get the tabs after the tab
      this.tabs = tabsBeforeIndex.concat(tabsAfterIndex); // Join them together */
      this.tabs.splice(index, 1);
      // Only change code above this line
      return this;
  };
  
  // Let's create three browser windows
  var workWindow = new Window(['GMail', 'Inbox', 'Work mail', 'Docs', 'freeCodeCamp']);
  var socialWindow = new Window(['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium']);
  var videoWindow = new Window(['Netflix', 'YouTube', 'Vimeo', 'Vine']);
  
  // Now perform the tab opening, closing, and other operations
  var finalTabs = socialWindow
      .tabOpen() // Open a new tab for cat memes
      .join(videoWindow.tabClose(2)) // Close third tab in video window, and join
      .join(workWindow.tabClose(1).tabOpen());
  console.log(finalTabs.tabs);
  