Always proove the code on your own!
If you would use some console-logs and test it on your own till end, you would recognize, that the code works. It’s only the CODE-AUTO-COMPLETION who makes some stroubles…
Take a look here…
CODE:
$w.onReady(function () {
let myTabs = $w("#tabs1").tabs
console.log("TABS: ", myTabs);
let myTab = $w("#tabs1").tabs[0]
console.log("TABS: ", myTab);
let numberOfTabs = myTabs.length; // 3
let firstTabId = myTabs[0].id;
console.log(firstTabId);
let firstTabLabel = myTabs[0].label;
console.log(firstTabLabel);
let secondTabId = myTabs[1].id;
console.log(secondTabId);
let secondTabLabel = myTabs[1].label;
console.log(secondTabLabel);
let thirdTabId = myTabs[2].id;
console.log(thirdTabId);
let thirdTabLabel = myTabs[2].label;
console.log(thirdTabLabel);
});
RESULT:
