JavaScript
JavaScript is a programming language used to add behavior to websites, build servers, create tools, and develop full applications.
What Is JavaScript
JavaScript runs in browsers and in runtimes such as Node.js, Bun, and Deno.
It is commonly used for interactive interfaces, API calls, backend services, command-line tools, and automation.
How To Use JavaScript
In the browser, add JavaScript with a script tag. In Node.js, create a .js file and run it with node.
Basic Example
const message = "Hello, JavaScript";
function greet(name) {
return `${message}. Welcome, ${name}.`;
}
console.log(greet("Tiew"));
Common Concepts
- Variables store values with
constandlet. - Functions group reusable behavior.
- Objects and arrays model data.
- Promises and
async/awaithandle asynchronous work.
What To Learn Next
Learn DOM manipulation, modules, fetch requests, error handling, testing, and modern JavaScript tooling.