[Go to site: main page, start]

0% found this document useful (0 votes)
10 views2 pages

JavaScript Basics Workshop Notes

The document provides JavaScript workshop notes aimed at junior developers, covering fundamental concepts such as variables, data types, operators, conditional statements, loops, functions, arrays, objects, DOM manipulation, events, and timing functions. It includes examples for each topic and suggests mini projects for practical application. Additionally, it lists practice questions to reinforce learning.

Uploaded by

yhz01012004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

JavaScript Basics Workshop Notes

The document provides JavaScript workshop notes aimed at junior developers, covering fundamental concepts such as variables, data types, operators, conditional statements, loops, functions, arrays, objects, DOM manipulation, events, and timing functions. It includes examples for each topic and suggests mini projects for practical application. Additionally, it lists practice questions to reinforce learning.

Uploaded by

yhz01012004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ JavaScript Workshop Notes (For Juniors)

by: [Your Name]

1. What is JavaScript?
JavaScript (JS) is a programming language of the web. It makes websites interactive and
dynamic. HTML = Structure, CSS = Style, JavaScript = Behavior.
Example: Click Me!

2. How to Run JavaScript


Ways to run JS: Inside HTML script tag, External JS File, and Browser Console.
[Link]('Hello JS');

3. Variables
Variables store data values. Use let for changeable, const for fixed.
let name = 'Hafijur'; const pi = 3.14; var age = 20;

4. Data Types
Common types: String, Number, Boolean, Array, Object, Null, Undefined.
let student = { name: 'Aarav', age: 19, isPresent: true };

5. Operators
Arithmetic: + - * / % | Comparison: == === != < > | Logical: && || !
let a = 10, b = 5; [Link](a > b && a != 0);

6. Conditional Statements
Use if-else or switch for conditions.
if(age >= 18){ [Link]('Vote'); }else{ [Link]('No'); }

7. Loops
for, while, for-of used for repeating tasks.
for(let i=0;i<5;i++){ [Link](i); }

8. Functions
Reusable blocks of code.
function greet(name){ [Link]('Hello '+name); }

9. Arrays
Array stores multiple values.
let fruits = ['Apple','Mango']; [Link]('Banana');

10. Objects
Objects store data in key-value pairs.
let car = { brand: 'Tata', model: 'Nexon' };

11. DOM Manipulation


JS can change HTML using DOM.
[Link]('heading').innerText='Hello!';

12. Events
Add interactivity using events like onclick or addEventListener.
[Link]('btn').addEventListener('click',()=>alert('Clicked
'));

13. Timing Functions


Execute code after delay or repeatedly.
setTimeout(()=>[Link]('Hi'),2000);

14. Mini Projects


Try building Counter, Color Changer, To-do List, Light ON/OFF, etc.

15. Practice Questions


1. Print 1–10 using loop. 2. Function to square a number. 3. Array of fruits. 4. Object
student. 5. Button changes color.

You might also like