Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Preformatted & Code</title> </head> <body> <h1>Code Examples</h1> <p>Use <code>console.log()</code> to print output.</p> <pre><code>function greet(name) { return "Hello, " + name + "!"; } console.log(greet("World"));</code></pre> <p>Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save.</p> <p>The program returned: <samp>Hello, World!</samp></p> <p>The variable <var>x</var> holds the count.</p> </body> </html>
Result
Open