The Code Lab
Pseudocode, JavaScript, Python, PHP, WordPress, web pages and React โ write it, run it, break it, fix it. Everything runs safely right here in your browser.
๐งฉ Pseudocode quick reference
BEGIN โฆ END program start & endTAKE A, B input from the userSET X = 10 store / change a valueDISPLAY X, "text" show output
IF โฆ THEN / ELSE IF / ELSE / END IFFOR I = 1 TO 10 [STEP 2] โฆ END FORFOR EACH X IN LIST โฆ END FORWHILE โฆ END WHILE ยท REPEAT 5 TIMES โฆ END REPEAT
FUNCTION F(A, B) โฆ RETURN โฆ END FUNCTION[1, 2, 3] lists (index from 0) ยท {"k": 1} mapsADD X TO LIST ยท REMOVE X FROM LISTMOD DIV AND OR NOT ยท LENGTH() MAX() MIN() POP()
โจ๏ธ Reading input & printing output in each language
| Language | Read the next input | Print a line |
|---|---|---|
| ๐งฉ Pseudocode | TAKE N | DISPLAY N |
| โก JavaScript | const n = Number(prompt()) | console.log(n) |
| ๐ Python | n = int(input()) | print(n) |
| ๐ PHP | $n = (int) readline(); | echo $n, "\n"; |
Put one input value per line in the Inputs box. Web pages and React components show a live preview instead, and their console.log messages appear under the preview.
๐ก๏ธ Is it safe? What runs where?
Your code runs in a locked sandbox inside your browser. It canโt see this website, your account or your files. JavaScript runs instantly; Python and PHP download a small WebAssembly runtime the first time you use them (a few seconds, then itโs cached). Programs that run longer than a few seconds are stopped automatically, so an accidental infinite loop can never freeze your page.