DEV Community


Discussion on: Challenge: Write a program that never stops

val_baca profile image
Valentin Baca • Edited

Javascript (empty statement evaluates to true so is effectively while(true)): for(;;);

Super-Evil Javascript DON'T RUN THIS LOL: for(;;)alert();

Python: while 1:0

Shell: yes
Funny story about yes is that in Unix it's actually just a blank file, which AT&T has the copywrite for o.0

Forem Open with the Forem app