When defining the variable by use of `var</C> everything works fine. Additionally I had to add the parameter <C>main</C> when calling the function and set the parameter <C>sub</C> in quotes as it's the name of the variable, a string, not it's content. For clarity I changed the parameter's name to <C>subName</C>. <CODE> `<i> </i> var sub = "json";
//using window[] function fillsubmenu(main, subName) { console.log(window[subName]) } fillsubmenu('x', 'sub')
@pryinfestedFeb 17.2023 — #I think you can find more information at https://stackoverflow.com/questions/60346763/why-global-let-variables-not-added-to-window-object-of-browser/[basket random](https://basketrandom.io)
It functions correctly, even on touch devices; however, there is no zooming feature and no constraint that the image should not exceed the borders of the container. The image is free to go beyond those boundaries.