JavaScript Playground
Experiment with JavaScript live in the editor below, then explore the most important JavaScript commands and concepts in the reference section.
JavaScript Quick Reference
Open each section below to explore important JavaScript commands and concepts.
📦 Variables
let const var typeof
🖥 Output & Input
console.log() alert() prompt() confirm()
📝 Strings
.length .toUpperCase() .toLowerCase() .includes() .slice() Template Strings
➕ Math
+ - * / % Math.random() Math.floor()
❓ Conditions
if else else if === > <
🔁 Loops
for while break continue
⚙ Functions
function return Arrow Functions Parameters
📚 Arrays
[] .push() .pop() .length .forEach() .map() .filter()
🧩 Objects
{}
Object Properties
Object.keys()
🌐 DOM Manipulation
document.querySelector() document.getElementById() .innerHTML .textContent .style .classList.add() .classList.remove()
🖱 Events
addEventListener() click keydown submit
⏱ Timers
setTimeout() setInterval() clearInterval()
