'Can i loop a kaboom.js scene?

I wanna do multiple scenes in kaboom.js. How can I use an array to loop it and work? example:

for (var i = 0 ; i<10 ; i++){
  scene("level-%d",array[i], () => {
    add([
    text("Example", {
      size: titleSize,
      width: titleWith,
    }),
    pos(posTitleX, posTitleY),
    ])
  });
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source