Question: I need to customize my QTabWidget so that one of its tab bars (lets say there are 4 tabs overall) has expanding property and will fill the remaining space between other tabs. Any ideas?

Answer: 
```
const func = () => console.log("hi");
const times = 3;

Array.from({length: times}, () => func());

```

I define a function.
I set the number of times to repeat function.
I make an array the size of times to repeat function.
I run the "defined function" on each element of the array.
You can also define a reusable function, utilizing `setInterval` and `clearInterval`

```
function runFunctionXTimes(callback, interval, repeatTimes) {
    let repeated = 0;
    const intervalTask = setInterval(doTask, interval)

    function doTask() {
        if ( repeated < repeatTimes ) {
            callback()
            repeated += 1
        } else {
            clearInterval(intervalTask)
        }
    }
} 

function sayHi() {
    console.log("Hi")
}

```

The following line will run `sayHi` 5 times without wasting any time between completion of one and the beginning of another.

```
runFunctionXTimes(sayHi, 0, 5)

```

It is also possible to pass function arguments to `setInerval`, you can read more about it here <https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval>