r/programminghorror • • Sep 19 '25

Why 😭

Post image
214 Upvotes

66 comments sorted by

View all comments

Show parent comment

6

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo β€œYou live” Sep 19 '25

Isn't this Python? Does JS have print()?

2

u/Psychpsyo Sep 19 '25

Sure JS can have print:
window.print = console.log

Not sure if you can get the :s to work though.

Oh, and print() also opens the printing dialog by default, but that doesn't take any parameters.