Just a caution for future clickers: This caused my mobile browser to spawn a bunch of print windows and was pretty annoying to exit.
Just a caution for future clickers: This caused my mobile browser to spawn a bunch of print windows and was pretty annoying to exit.
Which browser are you using?
It seems to be because I named the function that displays output print(). But it should shadow window.print(), and in most browsers it does, so I don't know what's going on!
(At any rate, this is a web archive snapshot from 2020 so I can't update the code!)
Could you try a different browser? It's not much, but it might make you smile :)
Here, I renamed the print function, that should fix the bug.
https://jsbin.com/seraputuve/edit?output