I only now realized, after quite some time exploring the forum [e.g. @dvbridges here], that I’m supposed to manually translate code blocks from Python to JS (by setting dropdown menu “code type” to “both” on code block window). I’d suggest this be explained more prominently on documentation (e.g. Manual section 5.5.3 - Code Component, perhaps a new section 7.0 - Exporting your experiment to JavaScript)
thanks!