myNotes
myNotes
<html></html> ->
html tag is a container tag and it is the root element(tag) of a HTML file.
<head></head>
head tag is also a container. head tag contains metadata of the html file.
<body></body>
body tag is also a container tag. all visualized part in web browser
are written inside the body tag
1. HTML
WHAT IS HTML?
HISTORY OF HTML?
2. CSS
WHAT IS CSS?
2. WEBSITE & WEB APPLICATION
3. TAG, ELEMENT, ATTRIBUTE
4. BASIC STRUCTURE
5. TAG OF HEAD TAG
6. TITLE, STYLE, SCRIPT, NOSCRIPT
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++
============================================================
---
1. Introduction to JavaScript
- What is JavaScript?
- Role of JavaScript in web development
- Setting up a development environment (Browser Console, VS Code, Node.js)
- Writing your first JavaScript program
1. What is JavaScript?
Ans -> JavaScript is the programming language of the web.
It can update and change both HTML and CSS.
It can calculate, manipulate and validate data.
OR
2. General-Purpose –
While it started as a web language, it is now used for backend development,
mobile apps,
and even AI applications.
3. Turing Complete –
JavaScript can simulate a Turing machine, meaning it can perform any
computation that any other
programming language can.
===================================================================
---
2. JavaScript Basics
- Variables (var, let, const)
- let vs const vs var
- Data Types (String, Number, Boolean, Null, Undefined, Object, Symbol,
BigInt)
- Operators (Arithmetic, Comparison, Logical, Assignment, etc.)
- Type Conversion
---
---
7. DOM Manipulation
- Selecting Elements (getElementById, querySelector, etc.)
- Changing Content and Attributes
- Adding and Removing Elements
- Event Listeners (click, mouseover, keydown, etc.)
4. Functions
- Function Declaration vs Function Expression
- Arrow Functions (=>)
- Function Parameters & Return Values
- Callback Functions
-Type of Functions
1. Named Function -
2. Anonymous Function - A function without a name, usually assigned to a
variable.
3. Arrow Function (ES6+) : - A shorter syntax for writing functions.
4. Immediately Invoked Function Expression (IIFE) : - A function that runs
immediately after it is defined.
5. Constructor Function - Used to create objects.
6. Callback Function - A function passed as an argument to another function.
7. Async Function (ES8+) - A function that uses async and await for handling
asynchronous operations.
---
5. JavaScript Objects
- Object Literals
- Accessing and Modifying Object Properties
---
6. Arrays in JavaScript
- Creating and Accessing Arrays
- Common Methods (push(), pop(), shift(), unshift(), splice(), slice(),
map(), filter(), reduce(), etc.)
- Iterating Over Arrays (forEach(), map())
---
---
=======================================================================\
JS:- JS stands for JavaScript, JavaScript was created in 1995 by sir Brendan Eich.
JavaScript is High-level, Dynamic and interpreted programming language.
JavaScript is a client side and also server side scripting language.
JavaScript follows camel format.
It is used to create dynamic web pages and is also used for validation.
The First name of JS was Mocha and second was Live-Script and Last & Current name
is JavaScript.
Box in JS :
1. Alert box:- Through the alert box we can print a message or a object value in a
Dialog box.
2. Confirm box:- Confirm box is used to take confirmation and return a Boolean
value
3. Prompt Box:- in prompt box we can print a message and also we can receive user
input.
datatype-
const, let, var;
Concatenation in JavaScript
("String value"+variable)
(name1+name2)
Typecasting in JS
convert one datatype to another
Quick Task
1. Add two numbers in JavaScript using user input;
Task -
1. What is JavaScript and use of JavaScript?
2. History of JavaScript.
3. What is Framework and 5 Frameworks of JS?
4. what is difference between ladder if-else and switch statement
5. difference between let, const, and var?
===================================================================================
======
___________________________________Self
Written__________________________________________
1. Keyword : Keywords are the reserved words, who has predefined meaning.
a = 10;
let b = 20;
var c = 30;
const d = 40;
3. DataTypes : -
JavaScript has 8 Types of DataType
1. String
2. Number
3. BigInt
4. Boolean
5. Undefined
6. null
7. Symbol
8. Object
4. Operator
5. Decision Controls
1. if :- if is a keywords which is used for decision making
2. if-else
3. ladder if-else
4. Switch Statement
5. Ternary Operator
6. Loop Controls
If you have a block of code and you want to execute that code again and again
up to a given condition is true then you can use loop controls.
1. While Loop:-
The while loop executes block repeatedly as long as the condition is true.
It is an entry-controlled loop (the condition is checked before executing the loop
body).
If the condition is false at the start, the loop never runs.
Syntax :-
Initialization;
while(condition)
{
//block of code to be executed
updation;
}
-------------------------
2. Do While Loop:-
The do-while loop is similar to the while loop.
The main difference is that it executes at least once, even if the condition is
false.
It is an exit-controlled loop (the body executes before checking the condition).
Syntax :-
Initialization;
do
{
//block of code to be executed
updation;
}while(condition);
-------------------------
3. For Loop
The for loop is used when the number of iterations is known.
and it is also similar to while loop but syntax is difference.
Syntax:-
for(initialization; condition, updation)
{
//block of code to be executed
}
--------------------------
4. Foreach Loop
The for-each loop is specifically used to iterate over arrays or collections (like
lists, sets, etc.).
It automatically fetches elements without needing an index.