Skip to main content

Complete JavaScript Notes for Beginner to Advance




 What is JavaScript

JavaScript is a high level programming Interpreted language.it is allow for developer add button animation website etc. This is run in the browser

Work with the JavaScript

1. CSS
2. HTML
3. JavaScript (logic and behaviour)

History of Javascript 

. Create by Brendan Eich in 1995
. Develope at the Netscape 
. Initially Name Mocha later live script finally Javascript 

Why Javascript Important 

. It is used frontend and the backend development 
. The high job of freelancing

JavaScript in The Variables

it is used for the data store

Var

var name="Ram"

Let

let age = 20;

Const

const city= "Delhi"

Use let and const

Types of Data Primitive

.String
.Number
.Boolean
.Undefined
.Null
Symbol
.Biglnt 

Examples;

let name="Aman"; //String
let marks= 80;  //Number
let isPass= true;  //Boolean

Operators in JavaScript

.Arithmetic: + - * / %

.Logical: && || !
.Assignment: = += -=
.Comparison: == === != > <

Examples;

let x = 45;
let y = 78;
console.log(x + y);

Conditional Statements

if-else

if (score >= 90) {
console.log("Eligible to Won");
}else{
console.log("it is not eligible")

Switch

switch(day) {
case 1;
console.log("Sunday")
break;
}

JavaScript in a loop

for loop

for(let x=3;  x<=9;  x++{
console.log(x);
}

while loop

let x = 1
while (i <= 8){
console.log(i);
i++;
}

function of JavaScript

its function is the reusable blocks of code.

function multiply(x, y) {
return x * y;
}
console.log(multiply(4, 5));

Arrow Function

const add = (x, y) => x + y;

Array in the JavaScript

Array are store in the multiple values.

let fruits = [ "Litchi", "Orange", "Mango"];
console.log(fruit[0]);

Object in JavaScript

objects are store data for key value of pairs.

let Student = {
fullName: "Kunal Thakur",
marks: 78,
subject: "Chemistry",
};
console.log(student.name);

Array Method of the Common

.push()
.pop()
.shift()
unshift()
.length()

Document Object Model(DOM)

DOM it is allow interact with HTML from JavaScript.

document.getElementById("myId").innerHTML = "Namaste";

Events in JavaScript

HTML of file

<div id="myId">
<button id="choice"> Choice anything</button>
</div>

  In JavaScript file 
document.getElementById("myId").addEventListener(
"click",
() => console.log("myId clicked"),
false
);





Comments

Popular posts from this blog

Biology MCQ for Based on The NEET

  Part 1 – Biology (Human Physiology & Genetics) – 50 MCQs Which organ produces insulin? A) Liver B) Pancreas  C) Kidney D) Spleen                                                                                                                                              Ans=(B) The functional unit of the kidney : A) Neuron B) Nephron  C) Alveoli D) Hepatocyte                                                                        ...

Operation Gandiv & NetGrid: India’s Digital Citizenship Filter Explained

Explore Operation Gandiv and NetGrid — India’s AI-driven digital citizenship filter. Learn how NPR data, voter ID verification, and AI algorithms are reshaping citizenship, creating digital borders, and impacting 21 crore unverified citizens. Introduction The debate around citizenship in India has evolved from street protests against CAA and NRC to a silent, server‑room operation. What began with voter ID verification through the Special Intensive Revision (SIR) has now expanded into a massive digital surveillance and filtering system — Operation Gandiv . This blog explores how NetGrid and Gandiv , an AI‑driven intelligence tool, are reshaping the idea of citizenship in India. From NRC to Digital Verification CAA & NRC protests : Citizens resisted showing decades‑old documents. Government’s response : Instead of physical verification, the Election Commission initiated SIR , cleaning voter lists. Linking voter ID with citizenship : While a voter card is not a citizens...

Class 12 Physics all Chapter MCQ

🧲 Chapter 1: Electric Charges & Fields ⚡ किसी वस्तु में आवेश का मूलभूत कण कौन है? A. इलेक्ट्रॉन B. प्रोटॉन C. न्यूट्रॉन D. फोटॉन उत्तर: A 🔌 कूलॉम का नियम किस पर निर्भर है? A. दूरी B. माध्यम C. आवेश D. उपरोक्त सभी उत्तर: D 🌀 वैद्युत क्षेत्र का SI मात्रक— A. N/C B. J/C C. N·m D. C·m उत्तर: A ⚛ दो समान आवेश दूर ले जाए जाएँ तो बल— A. बढ़ता है B. घटता है C. समान D. दो गुना उत्तर: B 📡 कूलॉम बल किस प्रकार का है? A. आकर्षण B. विकर्षण C. दोनों D. कोई नहीं उत्तर: C 🔋 Chapter 2: Electrostatic Potential & Capacitance 🔥 विद्युत विभव किसका कार्य है? A. स्थान का B. दूरी का C. कोण का D. रंग का उत्तर: A 💡 1 volt = A. 1 J/C B. 1 N/C C. 1 W/C D. 1 C/J उत्तर: A 🧾 धारिता (Capacitance) किस पर निर्भर? A. प्लेट क्षेत्रफल B. प्लेट दूरी C. डाइलेक्ट्रिक D. सभी उत्तर: D 🧲 1 farad = A. C/V B. V/C C. J/C D. N/C उत्तर: A 💠 समानांतर पट्टिका संधारित्र की धारिता— A. C = εA/d B. C = d/A C. C = εd/A D. C = Aε² उत्तर: A ...