Wix Element selector - does not except string anymore #wixstudio

I was able to select several sections in a for loop givin $w() a string to identify the element. In Wix studio this is not possible anymore as far as I can see.
i.e, the below works on Editor-X but not in Wix studio.
for (let i = 2; i <= lastSection; i++) {
$w(“#” + section + i.toString()).collapse();
}

Is there another solution for this? is this a bug?