An ordered set of instructions. It reads input, follows rules, and produces output.
Workspace
JavaScript
browser apps automation and API glue
Definition first
What JavaScript means
JavaScript is a programming language for writing exact instructions, often used for browser apps automation and API glue. Start with one mental model: input goes through steps and becomes output.
app.jsRun node app.jsHabit Use console.log and DevTools before adding abstractionsA value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
Browser console or Node.js is the place that actually runs code from app.js.
First readable code
Values and variables
const let string number boolean object arrayconst score = 40 + 2; console.log(score);
Output 42Language lineage
JavaScript family tree
See where JavaScript comes from, which languages feel close, and what to learn next.
front end behavior, Node.js scripts, API glue, and quick product experiments
Zero base path
Question bank
Search before practice
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
JavaScript practice 1
JavaScript question 1. Choose the statement that matches constant variable.
JavaScript practice 2
JavaScript question 2. Choose the statement that matches function return.
JavaScript practice 3
JavaScript question 3. Choose the statement that matches array mapping.
JavaScript practice 4
JavaScript question 4. Choose the statement that matches async await.
JavaScript practice 5
JavaScript question 5. Choose the statement that matches constant variable.
JavaScript practice 6
JavaScript question 6. Choose the statement that matches function return.
JavaScript practice 7
JavaScript question 7. Choose the statement that matches array mapping.
JavaScript practice 8
JavaScript question 8. Choose the statement that matches async await.
JavaScript practice 9
JavaScript question 9. Choose the statement that matches constant variable.
JavaScript practice 10
JavaScript question 10. Choose the statement that matches function return.
JavaScript practice 11
JavaScript question 11. Choose the statement that matches array mapping.
JavaScript practice 12
JavaScript question 12. Choose the statement that matches async await.
JavaScript practice 13
JavaScript question 13. Choose the statement that matches constant variable.
JavaScript practice 14
JavaScript question 14. Choose the statement that matches function return.
JavaScript practice 15
JavaScript question 15. Choose the statement that matches array mapping.
JavaScript practice 16
JavaScript question 16. Choose the statement that matches async await.
JavaScript practice 17
JavaScript question 17. Choose the statement that matches constant variable.
JavaScript practice 18
JavaScript question 18. Choose the statement that matches function return.
Multiple choice
JavaScript practice 1
JavaScript question 1. Choose the statement that matches constant variable.
const total = 42; console.log(total);
Reference
Patterns for app.js
node app.jsconst let string number boolean object array
Values and variables
const score = 40 + 2; console.log(score);
- Prefer const first
- Use let only when the value changes
- Inspect values with console.log
input output return reusable actions
Functions
function add(a, b) {
return a + b;
}
console.log(add(2, 3));- Name functions with verbs
- Return values instead of printing inside every function
- Keep one function focused
fetch promise await error handling
Async APIs
async function load() {
return await Promise.resolve("ready");
}
load().then(console.log);- Check network errors
- Await the promise before reading data
- Keep API parsing separate