Web Technology - JAVASCRIPT
Web Technology - JAVASCRIPT
Presented By
S.Vijayalakshmi B.E,
Assistant Professor,
Department of Computer Science,
Sri Sarada Niketan College for Women, Karur.
Introduction to JavaScript
Definition: JavaScript is a high-level, interpreted
programming language primarily used for web
development.
Key Features:
• Interactivity: Enhances user interactions on websites.
• Versatile: Used for both client-side and server-side
programming.
• Dynamic Typing: Variables don't require a defined type at
the time of declaration.
• Event-Driven: Responds to user actions like clicks,
JavaScript Syntax
Basic Syntax Rules:
• Statements: End with semicolons (optional in some cases).
• Variables: Declared with var, let, or const.
• Functions: Defined using the function keyword or as arrow
functions.
• Example:
let greeting = "Hello, World!";
console.log(greeting);
// Outputs: 15
Control Flow - Conditions and Loops
Conditional Statements:
if, else, else if, switch
Example:
let score = 85;
if (score > 90) {
console.log("A");
} else if (score > 80) {
console.log("B");
}
JavaScript Objects
// Outputs: 0 1 2 3 4
Other Built-in JavaScript Objects
Example:
let nums = [1, 2, 3, 4];
let doubled = nums.map(num => num * 2);
console.log(doubled);
Outputs: [2, 4, 6, 8]
THANK YOU