you are completely right – if you want to have a check every frame, you would need to set the interval to 16.
However, I recommend not doing so, because per-frame checks are really bad for performance, especially if you do calculations there per-entity and per-frame. It really is a compromise between perceived “fluidness” and performance here – try to set the interval as high as possible to still achieve the visual results you would like to have. Because note that especially on mobiles, which have less CPU power, heavy JS calculations per frame are bad for performance.
Usually it is best to try to think in terms of event-based logic, e.g. use the Physics system (which is implemented in C++ internally and pretty fast), to detect collisions and work with colliders to get notified of collisions. In case of a collision, you can then execute your JS code. If this is possible though, depends on your exact use case of course.
I hope that helped,