0% found this document useful (0 votes)
4 views13 pages

JavaScript Fundamentals

JavaScript is a programming language primarily used for web development, enabling interactivity on websites and functioning on both client-side and server-side. Key features include being lightweight, event-driven, and having a rich set of APIs, with various data types, operators, control flow structures, and functions. The document also covers DOM manipulation, event handling, and modern ES6+ features like let, const, and modules.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

JavaScript Fundamentals

JavaScript is a programming language primarily used for web development, enabling interactivity on websites and functioning on both client-side and server-side. Key features include being lightweight, event-driven, and having a rich set of APIs, with various data types, operators, control flow structures, and functions. The document also covers DOM manipulation, event handling, and modern ES6+ features like let, const, and modules.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

TECH DESIGN

JAVASCRIPT FUNDAMENTALS
UNDERSTANDING THE CORE BUILDING BLOCKS OF WEB DEVELOPMENT
WHAT IS JAVASCRIPT

 A programming language used mainly for web


development.
 Runs inside browsers (client-side) and also on
servers (Node.js).
 Adds interactivity to websites.
 Initially built for browsers, now used in mobile
apps, desktop apps, and backend services.
KEY FEATURES OF JAVASCRIPT

Lightweight & interpreted

Event-driven

Prototype-based OOP

Cross-platform

Rich set of APIs


VARIABLES & DATA TYPES

variables Data Types


 var, let, const – ways to store data  Data types: string, number, boolean,
null, undefined, object, symbol, bigint.
OPERATORS

 Arithmetic: +, -, *, /, %, **
 Assignment: =, +=, -=
 Comparison: ==, ===, !=, !==, <, >
 Logical: &&, ||, !
CONTROL FLOW

 Conditional statements: if, else if, else, switch


 Loops: for, while, do...while, for...of, for...in
FUNCTION

 Function declaration:

function greet() { console.log("Hello!"); }


 Function expression:

const greet = function() {};


 Arrow functions:

const greet = () => {};


OBJECTS & ARRAYS

 Objects: key-value pairs  Arrays: ordered lists

const person = { name: "John", const colors = ["red",


age: 30 }; "green", "blue"];
DOM MANIPULATION

Accessing elements:
getElementById,
queryselector
Changing
content: .innerHTML , .
textConte

Changing Style: .style


property
EVENTS

 Event types: click, input, mouseover, keypress


 Adding listeners:
element.addEventListener("click", myFunction):
ES6+ FEATURES

•let & const


•Template literals
•Destructuring
•Spread & rest operators
•Modules (import, export)
THANK YOU

You might also like