Hello World
This tutorial shows you how to run your first JavaScript program with QuickJS-ng.1
Create a JavaScript file
Create a file named This is the simplest possible QuickJS program that prints output to the console.
hello.js with the following content:2
Run with qjs
Execute the script using the Expected output:
qjs interpreter:3
Run in REPL mode
You can also run QuickJS in interactive mode without a file:Then type JavaScript directly:
Next Steps
- Learn about embedding QuickJS
- Explore JavaScript modules
- Create native C functions