I was trying some code at JSBin and got weird results. This should work - it's a simple loop that uses Window.prompt. It does execute the correct number of time
ontouchstart
onreadystatechange
android-camera-intent
unattended-processing
dfc
hamiltonian-cycle
linux-security-module
google-2fa
mahjong
bson-ext
libs
database-performance
webpack-serve
digital-ocean-spaces
readable
insert-into
autodesk-designautomation
cabal-new
gcp-secrets-manager
telnet
transcription
frida
fragment-lifecycle
flask-extensions
hashcode
hrbrthemes
consensus
teamcenter-itk
ngx-mydatepicker
acts-as-commentable