What is JavaScript?
JavaScript is the programming language of the web. It makes websites interactive — buttons, animations, forms, and much more.
15 min•By Priygop Team•Last updated: Feb 2026
What is JavaScript?
JavaScript (JS) is a lightweight, interpreted programming language. While HTML structures a page and CSS styles it, JavaScript makes it interactive. When you click a button, submit a form, or see an animation — that's JavaScript. It runs directly in the browser, no installation needed. Today, JavaScript also runs on servers (Node.js) and is used to build mobile apps.
What JavaScript Can Do
- Change HTML content dynamically (show/hide elements)
- Respond to user actions (clicks, keyboard, mouse)
- Validate form inputs before submitting
- Fetch data from servers (APIs) without reloading the page
- Create animations and visual effects
- Build full web applications (React, Vue, Angular)
- Run on servers with Node.js
Your First JavaScript
Example
// This is a JavaScript comment
console.log("Hello, World!");
console.log("Welcome to JavaScript!");
console.log("I am learning to code!");Try It Yourself: Hello World
Try It Yourself: Hello WorldJavaScript
JavaScript Editor
✓ ValidTab = 2 spaces
JavaScript|11 lines|245 chars|✓ Valid syntax
UTF-8