0% found this document useful (0 votes)
25 views11 pages

JavaScript Guide: Basics to ES6

The document is a comprehensive guide to JavaScript, covering fundamental concepts such as variables, loops, arrays, functions, and DOM manipulation in both English and Roman Urdu. It includes examples for each topic to illustrate the concepts effectively. Additionally, it discusses asynchronous JavaScript, the Fetch API, and ES6 features to enhance code readability and functionality.
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)
25 views11 pages

JavaScript Guide: Basics to ES6

The document is a comprehensive guide to JavaScript, covering fundamental concepts such as variables, loops, arrays, functions, and DOM manipulation in both English and Roman Urdu. It includes examples for each topic to illustrate the concepts effectively. Additionally, it discusses asynchronous JavaScript, the Fetch API, and ES6 features to enhance code readability and functionality.
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

JavaScript Complete Guide

English + Roman Urdu | With


Examples & Visuals
Variables (var, let, const)
• English: var = function-scoped, let = block-scoped, const = block-scoped
(unchangeable)
• Roman Urdu: var purani tareeqay ka variable hai, let aur const naye hain jo
block ke andar kaam karte hain.
• Example: let name = 'Ali'; const pi = 3.14;
Loops
• English: Used to repeat code (for, while, do-while)
• Roman Urdu: Loops code ko bar bar chalane ke liye use hote hain.
• Example: for(let i=0;i<5;i++){ [Link](i); }
Arrays
• English: Arrays store multiple values in one variable.
• Roman Urdu: Array ek dabba hai jisme multiple cheezein store hoti hain.
• Example: let fruits = ['Apple','Mango','Banana'];
Functions
• English: Functions are reusable blocks of code.
• Roman Urdu: Function ek machine hai jo input leta hai aur output deta
hai.
• Example: function add(a,b){ return a+b; }
DOM Manipulation
• English: Change HTML using JS with .innerHTML, getElementById,
getElementsByClassName.
• Roman Urdu: JS ke zariye HTML elements ko update ya change karna.
• Example: [Link]('demo').innerHTML = 'Hello';
Events
• English: Actions like onclick, onchange, onkeydown trigger functions.
• Roman Urdu: Jab user koi action kare to JS ka response aata hai.
• Example: [Link] = function(){ alert('Clicked!'); }
Objects
• English: Objects store key-value pairs.
• Roman Urdu: Object ek dictionary jesa hota hai.
• Example: let car = {brand:'Toyota', model:'Corolla'};
Asynchronous JS
• English: JS can run async with setTimeout, Promises, async/await.
• Roman Urdu: Async ka matlab hai ek kaam rukay baghair doosra shuru ho
jaye.
• Example: setTimeout(()=>{[Link]('Hello');},1000);
Fetch API
• English: Used to get data from APIs (AJAX replacement).
• Roman Urdu: API se data lene ka naya tareeqa.
• Example: fetch('url').then(res=>[Link]()).then(data=>[Link](data));
ES6 Features
• Template Literals, Destructuring, Spread Operator, Arrow Functions
• Roman Urdu: Naye JS features jo code ko easy aur readable banate hain.
• Example: const sum = (a,b) => a+b;

You might also like