Skip to Content
JavaScriptJS Basics

JavaScript Basics

What is JavaScript?

JavaScript adds interactivity and behavior to web pages.

Key Concepts

Variables

const name = 'Google'; // cannot be reassigned let count = 0; // can be reassigned

DOM Manipulation

// Select an element const button = document.querySelector('.search-btn'); // Add an event listener button.addEventListener('click', () => { console.log('Button clicked!'); });

My Notes

Last updated on