Run Zsh 5 scripts online — the interactive shell champion.
Zsh is the shell that beat bash for interactive use — better tab completion, arrays that behave, spelling correction. It is macOS's default since Catalina.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
read n; echo $((n * 2))
21
42