This should play if your Web browser has WebAssembly enabled (most do). Most examples will play unless they need to load files. The first time you click Play, Csound will spend a few seconds loading, then play. You can edit this code and replay it.
; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 ; sr = 44100 ; ksmps = 64 ; nchnls = 1 instr 1 ; printsk is executed at k-time, possibly multiples times per cycle. k0 = 0 while k0 < 20 do if k0 % 2 == 0 then printsk "k0 = %d\n", k0 endif k0 += 1 od endin instr 2 ; println is similar to printsk but appends a new line k0 = 0 while k0 < 20 do if k0 % 2 == 0 then println "k0 = %d", k0 endif k0 += 1 od endin i 1 0 0.1 i 2 0.1 0.1 e