Chapter - 1 Intro to JavaScript
JavaScript is a Programming language. JavaScript is a Client Side Scripting Language. What is
Scripting ? scripting language means story writer language of product development ex- web app ,
desktop app , android app etc. There are two types of scripting 1. Client Side ( Executes in browser
[ JavaScript ] ) 2. Server Side ( Executes in Server [ PHP ] )
Chapter - 2 Output from JavaScript
JavaScript is a Programming language. JavaScript is a Client Side Scripting Language. What is
Scripting ? scripting language means story writer language of product development ex- web app ,
desktop app , android app etc. There are two types of scripting 1. Client Side ( Executes in browser
[ JavaScript ] ) 2. Server Side ( Executes in Server [ PHP ] )
SCRIPTING TYPE OF JAVASCRIPT 1. Internal Scripting <head> or <body> <script> write your
JavaScript Code..</script> </head> or </body> 2. External Scripting <head> or <body> <script
src=”externalpage.js”></script> </head> or </body> What is Data ? Any information is called a data
ex : - number , text , word , audio , video or any file . How to get any output (result) in JavaScript
window.alert() if you want to display your result in a dialog box (Popup box) so you have to use
window.alert() method . document.write() if you want to display your result in your webpage
without using any html tag so you have to use document.write() method . console.log() if you want
to display your result in the console window of your browser so you have to use con
innerHTML if you want to display your result with the help of html tag in your webpage so you have
to use innerHTML method . LET`S CREATE A BASIC PROGRAM 1. write a program to print STP
Computer Education a dialog box. <body> <script> window.alert(“STP Computer Education”);
</script> </body> Note:- Letter ex- a , b , c = every alphabet is known as character in the respect of
programming. Words ex- stp , css , apple = every words are known as string in the respect of
programming. Let`s know some usefull symbol name ( ) Parenthesis [ ] square brackets or box
brackets { } braces or curly brackets < > angle brackets ‘ ’ single quote “ ” double quote : colon
; semi colon \ backward slash & and - hyphens _ underscore = assign == equal to * astric
Chapter - 3 Keywords
What is programming ? The steps that you take to achieve any result will be called programming.
द आ आ | JavaScript
Reserved Words (Keywords) Keywords are the way to define the meaning of any data for your
interpreter and compiler. abstract arguments await* boolean break byte case catch char class*
const continue debugger default delete do double else enum* eval export* extends* false final
finally float for function goto if implements import* in instanceof int interface let* long native new
null package private protected public return short static super* switch synchronized this throw
throws transient true try typeof var void volatile while with yield
Chapter - 4 JavaScript Functions Identity of a function is () A function is a group of statements that
together perform a task And it works when you call it. There are two types of Functions. 1. Built in
function (predefined function) Their work is already sure And these can be called just. You can`t
make predefined function only you can call predefined function 2. User defined function JavaScript
allows you to define functions according to your need. These functions are known as user-defined
functions. Working with predefined functions Name of some predefined functions 1. alert() :
window.alert() 2. write() : document.write() 3. log() : console.log()
Note : remember you can only call predefined functions you haven`t any permission to change or
edit predefined functions . How to call a predefined function If you want to call a function you have
to learn about mouse or keyboard events Mouse Events onclick , onchange , onmouseover ,
onmouseout
Chapter - 7 Variables What is Variables ? Variable is a medium that allows us to work on data stored
in memory . Variable दद store data
X = 8 Variable Assignment Operator Value (constant)
Chapter - 10 Selectors in JavaScript Selectors are used to select html elements to perform some
task and actions on html elements. There are so many Selectors in JavaScript . 1.
getElementsByTagName() : select HTML element through tag name. 2. getElementsByName() :
select HTML element through the value of name attribute. 3. getElementById() : select HTML
element through the value of id attribute. 4. getElementsByClassName() : select HTML element
through the value of class attribute.
Chapter - 16 Comments and Operators Comments are a medium with the help of which we
understand the meaning of our code Comments दद आ code
meaning । Types of Comments 1. Single line comment // single line comment
looks like this 2. Multi line comment /* multi line comment looks like this */ Example of single line
comments <script> var = x = 6 ; // here we are declaring variable </script>
Chapter - 16 Comments and Operators Comments are a medium with the help of which we
understand the meaning of our code Comments दद आ code
meaning । Types of Comments 1. Single line comment // single line comment
looks like this 2. Multi line comment /* multi line comment looks like this */ Example of single line
comments <script> var = x = 6 ; // here we are declaring variable </script>
Example of multi line comments <script> Var = x ,y,z; /* from here we are going to start variable
declaration method that is called after declaration */ X = 6; Y = 5; Z = 10; </script> Operators in
JavaScript 1. What is operator ? Operators is a mathematical symbol used to manipulate between
two data . Operator द data द द । 2. What is
operands ? The data of operators are known as operands . operator
operand । 5+2 Operator Data , Operand Data , Operand
Types of operator in JavaScript 1. Arithmetic operators 2. Assignment operators 3. Comparison
operator 4. Logical or relational operator 5. Type operators 6. Bitwise operator 7. Conditional or
ternary operator Arithmetic Operators Operators Name + Addition - Subtraction * Multiplication /
Division % Modulus (Remainder) ++ Increment -- Decrement
Assignment operators = += -= *= /= %= == === != !== assign addition assign
subtraction assign multiplication assign division assign modular assign Comparision operators equal
to equal to and equal type not equal not equal or not equal type
> greater than < >= <= ? less than greater than or equal to less than or equal to ternary
operator