SlideShare ist ein Scribd-Unternehmen logo
1 von 21
JavaScript Basics
ADMEC MULTIMEDIA
Leader in Animation & Digital Media Education
ISO 9001:2008 CERTIFIED | ADOBE Testing Center
www.admecindia.co.in
Content
i. What is JavaScript?
ii. Use of JavaScript?
iii. Features of JavaScript
Popups
Variable
Scopes
Function
iv. DATATYPE in JavaScript
Number
String
Undefined
Boolean
Null
v. Operators in JavaScript
Assignment Operator
Equality Operator
Strict Equality Operators
What is JavaScript?
JavaScript is scripting/programming language. File
Extension of JavaScript is ".js”. This extension can be catched
by a number of applications including Windows Script Host,
Dreamweaver MX, Notepad, Netscape Navigator, PavScrip,
UltraEdit.
JavaScript is also considered as "assembly language of the
web". JavaScript is totally user based. It is does not store any
in-built data or function.
JavaScript is object oriented. We can also create small objects
with help of basic JavaScript.
Use of JavaScript?
JavaScript is also used to make websites rich and
dynamic. Almost every website have JavaScript used in
it. It tells how JavaScript important for us.
There are plenty of websites and applications which are
using JavaScript such as: Gmail, Google, YouTube,
Yahoo, LinkedIn, Twitter, Facebook etc...
Features of JavaScript
POPUPS
Popup is additional display box/window surprisingly
comes over web browser with information & notice.
• Alert: Is any notice to the viewer & provide only
option to "OK" after reading.
Example:
alert('welcome to js');
• Confirm: It is useful to display any of information/
message to viewer which let them decide for
accepting & rejecting information with option of
"OK" & "CANCEL“
Example:
confirm('Are u sure to visit this page?');
• Prompt: Take input (info/text/massage/name--
alphabetic value) from Viewers.
Example:
prompt('Enter ur name plz');
VARIABLE:
Variable is a kind of container with limited space where
we can put value (Numeric, String, Boolean [true/false],
objects etc) just for one time if we try to put 2nd value
1st will automatically eliminate. Variable can be
identified with unique names.
Variable are restricted with some special characters
(symbols) like we can only use underscore (_), dollar ($)
and Alpha Numeric character.
The right way to write variables
var myNum = 45;
var my_num = 55;
var num1 = 11;
var num = 78
SCOPES:
Scope is set of Variable, objects and Function you can
use. (Local & Global)
Maintain accessibility through variable & function.
There are 2 Variable used: Local Variable & Global
Variable
In Local Scope, Variable is declared within the Function
whereas Global Scope, Variable is Declared Outside the
function.
Data remain secure if we used local Variable.
FUNCTION:
A function is a group of reusable code which enables a
programmer to create a code that is in better
organization and execution and which can be called
anywhere in your program. In short function eliminates
the repetitive writing of same codes.
Function helps a programmer to divide a big program
into a number of small chunks of program and also
helps in managing functions easily & effectively.
The most common way to define a function in JavaScript
is by using the keyword “function”.
Syntax of function:
function main() //head of the function, these brackets () are
called parenthesis
{
//body of the function
}
Types of function: Named Function & Anonymous Function
Examples:
Named function:
function main()
{
}
Note: declared a 'main' function. The name of the function is
'main'.
Unnamed function:
var main = function ()
{
}
Note: Declared an unnamed function and at the same time
assigned to a variable 'main'. You can't declare a function
without the name so you need to store that in a variable. This
type of declaring method of function known as 'closure' in
JavaScript.
DATATYPE in JavaScript
There 5 Primitive Datatypes given below:
Number:
 A JavaScript programmer all the time have to deal with
numbers. It is a value and we use it in various operations in
the application or website. Some times you can't get the
expected result and either your program gets broken or
filled with errors because of non-numeric types of values.
 JavaScript offers main 3 functions to convert any of the
value to number.
 Numbers can be written with or without decimals.
Example:
var num = 10.25;
1. alert(Number(num)); //10.25
2. alert(parseInt(num)); //10
3. alert(parseFloat(num)); //10.25
String:
 String (value) is used to represent text related data. String
is also a set of “element” of 16-bit unsigned integer value
which start from the first element is ZERO and the next is
ONE and so on at index.
 We can use string literals in scripts by enclosing them in
single or double quotation marks e.g. (‘ ’, “ ”).
Example:
Single Quotation Mark
alert('you clicked on CANCEL');
Double Quotation Mark
alert("you clicked on "OK"");
Note: In JavaScript, does not have a type to represent a single
character. To represent a single character in JavaScript, we
have to create a string that contain only single character. A
string that contains empty string or zero characters ("") is an
empty or string with zero-length.
String(value) function can be used to convert any value to
string datatype.
Undefined:
Undefined is a variable which doesn’t have any defined value.
Example:
var num; // contains no value
alert(num);// will get undefined
Boolean:
Boolean have two values i.e. “true or false” or 1 or 0 and are
logical representative.
Example:
if(confirm('Are you sure to leave this page')){
//you will be redirected to the following URL if above condition is true
means if someone clicks on the OK button
window.location.href = 'http://www.admecindia.co.in';
}else{
//nothing will happen if someone clicks on CANCEL button as you
will receive false as the result
return false;
}
Note: In above example you either get True or False depends on
the button you clicked means you are getting a Boolean value.
Null:
Null is exactly having single value when Null is defined or
nothing. Null is considered as an object in JavaScript.
var my_value = null;
alert(my_value * 20); //0
Note:
1. null gets converted to the false boolean value and i.e. 0 too
2. null and 'null' both are different terms completely
3. null can be used when you want to reset a variable or want
to store nothing
NOTE
There are 2 other datatypes considered according to
ECMAScript standard.
Symbol: symbol as in primitive datatype which are unique
and unchangeable. In some programming language they are
also called “atoms”.
Object: object data type refers to the structure consist of data
& information for working with the data.
Operators in JavaScript
Types of Operators:
 Assignment Operator: The equal sign (=) is called
“Assignment” Operators.
 Equality Operator: when double the equal sign (==) is
called “Equality” Operator. Is also called comparison
Operator.
 Strict Equality Operators: when Triple the equal sign
(===) is called “Strict Equality” Operator. Is also called
comparison Operator.
Remark
These are just the basics of JavaScript and all
these topics play a vital role when you create
something using JavaScript.
As much you are familiar with these basics more
you would be strong in JavaScript.
Contact Us:
ADMEC MULTIMEDIA INSTITUTE
C-7/114, IInd Floor, Sector- 7, Rohini, Delhi- 85
Landmark: Near Rohini East Metro Station
Helpline 1: +91 9811 818 122
Helpline 2: +91 9911 782 350
ADMEC MULTIMEDIA
Leader in Animation & Digital Media Education
ISO 9001:2008 CERTIFIED | ADOBE Testing Center
ADMEC MULTIMEDIA INSTITUTE
For More information you can visit :
http://www.admecindia.co.in

Weitere ähnliche Inhalte

Was ist angesagt?

Operator overloading
Operator overloadingOperator overloading
Operator overloadingBurhan Ahmed
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in pythonSarfaraz Ghanta
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript ProgrammingSehwan Noh
 
Introduction to web programming with JavaScript
Introduction to web programming with JavaScriptIntroduction to web programming with JavaScript
Introduction to web programming with JavaScriptT11 Sessions
 
Operator overloading
Operator overloadingOperator overloading
Operator overloadingKumar
 
JavaScript - Chapter 5 - Operators
 JavaScript - Chapter 5 - Operators JavaScript - Chapter 5 - Operators
JavaScript - Chapter 5 - OperatorsWebStackAcademy
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSTRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSowmyaJyothi3
 
Intoduction to structure
Intoduction to structureIntoduction to structure
Intoduction to structureUtsav276
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use casesSrajan Mor
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++Neeru Mittal
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript TutorialBui Kiet
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programmingKamal Acharya
 

Was ist angesagt? (20)

Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in python
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
 
Css ppt
Css pptCss ppt
Css ppt
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Javascript Basic
Javascript BasicJavascript Basic
Javascript Basic
 
Introduction to web programming with JavaScript
Introduction to web programming with JavaScriptIntroduction to web programming with JavaScript
Introduction to web programming with JavaScript
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
JavaScript - Chapter 5 - Operators
 JavaScript - Chapter 5 - Operators JavaScript - Chapter 5 - Operators
JavaScript - Chapter 5 - Operators
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1
 
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSTRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
 
Intoduction to structure
Intoduction to structureIntoduction to structure
Intoduction to structure
 
Python Built-in Functions and Use cases
Python Built-in Functions and Use casesPython Built-in Functions and Use cases
Python Built-in Functions and Use cases
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
 

Andere mochten auch

Advanced Object-Oriented JavaScript
Advanced Object-Oriented JavaScriptAdvanced Object-Oriented JavaScript
Advanced Object-Oriented JavaScriptecker
 
Form Validation in JavaScript
Form Validation in JavaScriptForm Validation in JavaScript
Form Validation in JavaScriptRavi Bhadauria
 
Javascript - Numbers
Javascript   - NumbersJavascript   - Numbers
Javascript - NumbersSamuel Santos
 
JavaScript
JavaScriptJavaScript
JavaScriptSunil OS
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsRavi Bhadauria
 
Responsive web design - tips & tricks
Responsive web design - tips & tricksResponsive web design - tips & tricks
Responsive web design - tips & tricksRavi Bhadauria
 
Differentiate illustrator n coreldraw
Differentiate illustrator n coreldrawDifferentiate illustrator n coreldraw
Differentiate illustrator n coreldrawRavi Bhadauria
 
Introduction to User Experience Design
Introduction to User Experience DesignIntroduction to User Experience Design
Introduction to User Experience DesignRavi Bhadauria
 
Video Conferencing Ppt
Video Conferencing PptVideo Conferencing Ppt
Video Conferencing PptJAGJITSINGH25
 

Andere mochten auch (10)

Loops in java script
Loops in java scriptLoops in java script
Loops in java script
 
Advanced Object-Oriented JavaScript
Advanced Object-Oriented JavaScriptAdvanced Object-Oriented JavaScript
Advanced Object-Oriented JavaScript
 
Form Validation in JavaScript
Form Validation in JavaScriptForm Validation in JavaScript
Form Validation in JavaScript
 
Javascript - Numbers
Javascript   - NumbersJavascript   - Numbers
Javascript - Numbers
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjs
 
Responsive web design - tips & tricks
Responsive web design - tips & tricksResponsive web design - tips & tricks
Responsive web design - tips & tricks
 
Differentiate illustrator n coreldraw
Differentiate illustrator n coreldrawDifferentiate illustrator n coreldraw
Differentiate illustrator n coreldraw
 
Introduction to User Experience Design
Introduction to User Experience DesignIntroduction to User Experience Design
Introduction to User Experience Design
 
Video Conferencing Ppt
Video Conferencing PptVideo Conferencing Ppt
Video Conferencing Ppt
 

Ähnlich wie Java script basic

Basics of Javascript
Basics of Javascript Basics of Javascript
Basics of Javascript poojanov04
 
379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogrammingLuis Atencio
 
Ch3- Java Script.pdf
Ch3- Java Script.pdfCh3- Java Script.pdf
Ch3- Java Script.pdfHASENSEID
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A ReviewFernando Torres
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)sourav newatia
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Devang Garach
 
Javascript tutorial basic for starter
Javascript tutorial basic for starterJavascript tutorial basic for starter
Javascript tutorial basic for starterMarcello Harford
 
Complete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScriptComplete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScriptEPAM Systems
 
Visual Programming
Visual ProgrammingVisual Programming
Visual ProgrammingBagzzz
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript ProgrammingRaveendra R
 

Ähnlich wie Java script basic (20)

Basics of Javascript
Basics of Javascript Basics of Javascript
Basics of Javascript
 
379008-rc217-functionalprogramming
379008-rc217-functionalprogramming379008-rc217-functionalprogramming
379008-rc217-functionalprogramming
 
chap04.ppt
chap04.pptchap04.ppt
chap04.ppt
 
Ch3- Java Script.pdf
Ch3- Java Script.pdfCh3- Java Script.pdf
Ch3- Java Script.pdf
 
Web programming
Web programmingWeb programming
Web programming
 
Chapter 2- Prog101.ppt
Chapter 2- Prog101.pptChapter 2- Prog101.ppt
Chapter 2- Prog101.ppt
 
Pc module1
Pc module1Pc module1
Pc module1
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A Review
 
PRELIM-Lesson-2.pdf
PRELIM-Lesson-2.pdfPRELIM-Lesson-2.pdf
PRELIM-Lesson-2.pdf
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
 
copa-ii.pptx
copa-ii.pptxcopa-ii.pptx
copa-ii.pptx
 
Javascript tutorial basic for starter
Javascript tutorial basic for starterJavascript tutorial basic for starter
Javascript tutorial basic for starter
 
Complete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScriptComplete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScript
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 
Java script
Java scriptJava script
Java script
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 

Mehr von Ravi Bhadauria

3 Important Terms of Post Production
3 Important Terms of Post Production3 Important Terms of Post Production
3 Important Terms of Post ProductionRavi Bhadauria
 
Basics of Video Editing | Types of Video Editing | Video Production Process
Basics of Video Editing | Types of Video Editing | Video Production ProcessBasics of Video Editing | Types of Video Editing | Video Production Process
Basics of Video Editing | Types of Video Editing | Video Production ProcessRavi Bhadauria
 
Basics of Media | Types of Media | Units in Media | Software in Media | Color...
Basics of Media | Types of Media | Units in Media | Software in Media | Color...Basics of Media | Types of Media | Units in Media | Software in Media | Color...
Basics of Media | Types of Media | Units in Media | Software in Media | Color...Ravi Bhadauria
 
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...History of Visual Communication | Guide to Visual Communication by ADMEC Mult...
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...Ravi Bhadauria
 
Elements and Principles of Design (Updated)
Elements and Principles of Design (Updated)Elements and Principles of Design (Updated)
Elements and Principles of Design (Updated)Ravi Bhadauria
 
Top Graphic Designing Hacks to Make You a Designing Pro Today
Top Graphic Designing Hacks to Make You a Designing Pro Today Top Graphic Designing Hacks to Make You a Designing Pro Today
Top Graphic Designing Hacks to Make You a Designing Pro Today Ravi Bhadauria
 
12 Famous Typographers to Inspire You
12 Famous Typographers to Inspire You12 Famous Typographers to Inspire You
12 Famous Typographers to Inspire YouRavi Bhadauria
 
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)Ravi Bhadauria
 
UX Design Essential Theories
UX Design Essential TheoriesUX Design Essential Theories
UX Design Essential TheoriesRavi Bhadauria
 
Workshop on resume, portfolio, interview
Workshop on resume, portfolio, interviewWorkshop on resume, portfolio, interview
Workshop on resume, portfolio, interviewRavi Bhadauria
 
Top 10 Architecture Design Colleges in India
Top 10 Architecture Design Colleges in IndiaTop 10 Architecture Design Colleges in India
Top 10 Architecture Design Colleges in IndiaRavi Bhadauria
 
User interface and user experience ui ux design basics
User interface  and user experience ui ux design basicsUser interface  and user experience ui ux design basics
User interface and user experience ui ux design basicsRavi Bhadauria
 
How to create Frost Neon Effect in Photoshop?
How to create Frost Neon Effect in Photoshop?How to create Frost Neon Effect in Photoshop?
How to create Frost Neon Effect in Photoshop?Ravi Bhadauria
 
Top 10 design colleges and institutes of india
Top 10 design colleges and institutes of indiaTop 10 design colleges and institutes of india
Top 10 design colleges and institutes of indiaRavi Bhadauria
 
Best Hollywood poster designers
Best Hollywood poster designersBest Hollywood poster designers
Best Hollywood poster designersRavi Bhadauria
 
Design Principles for All the Designers
Design Principles for All the DesignersDesign Principles for All the Designers
Design Principles for All the DesignersRavi Bhadauria
 
Content Writing Tips for SEO
Content Writing Tips for SEOContent Writing Tips for SEO
Content Writing Tips for SEORavi Bhadauria
 
6 Great Steps to Know to Create Successful Web GUI
6 Great Steps to Know to Create Successful Web GUI6 Great Steps to Know to Create Successful Web GUI
6 Great Steps to Know to Create Successful Web GUIRavi Bhadauria
 

Mehr von Ravi Bhadauria (20)

3 Important Terms of Post Production
3 Important Terms of Post Production3 Important Terms of Post Production
3 Important Terms of Post Production
 
Basics of Video Editing | Types of Video Editing | Video Production Process
Basics of Video Editing | Types of Video Editing | Video Production ProcessBasics of Video Editing | Types of Video Editing | Video Production Process
Basics of Video Editing | Types of Video Editing | Video Production Process
 
Basics of Media | Types of Media | Units in Media | Software in Media | Color...
Basics of Media | Types of Media | Units in Media | Software in Media | Color...Basics of Media | Types of Media | Units in Media | Software in Media | Color...
Basics of Media | Types of Media | Units in Media | Software in Media | Color...
 
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...History of Visual Communication | Guide to Visual Communication by ADMEC Mult...
History of Visual Communication | Guide to Visual Communication by ADMEC Mult...
 
Elements and Principles of Design (Updated)
Elements and Principles of Design (Updated)Elements and Principles of Design (Updated)
Elements and Principles of Design (Updated)
 
Top Graphic Designing Hacks to Make You a Designing Pro Today
Top Graphic Designing Hacks to Make You a Designing Pro Today Top Graphic Designing Hacks to Make You a Designing Pro Today
Top Graphic Designing Hacks to Make You a Designing Pro Today
 
12 Famous Typographers to Inspire You
12 Famous Typographers to Inspire You12 Famous Typographers to Inspire You
12 Famous Typographers to Inspire You
 
Sargam UI Design
Sargam UI DesignSargam UI Design
Sargam UI Design
 
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)
Use of Shapes in Graphic Design | Psychology of Shapes by ADMEC (Updated)
 
UX Design Essential Theories
UX Design Essential TheoriesUX Design Essential Theories
UX Design Essential Theories
 
Top 10 Ad Gurus
Top 10 Ad GurusTop 10 Ad Gurus
Top 10 Ad Gurus
 
Workshop on resume, portfolio, interview
Workshop on resume, portfolio, interviewWorkshop on resume, portfolio, interview
Workshop on resume, portfolio, interview
 
Top 10 Architecture Design Colleges in India
Top 10 Architecture Design Colleges in IndiaTop 10 Architecture Design Colleges in India
Top 10 Architecture Design Colleges in India
 
User interface and user experience ui ux design basics
User interface  and user experience ui ux design basicsUser interface  and user experience ui ux design basics
User interface and user experience ui ux design basics
 
How to create Frost Neon Effect in Photoshop?
How to create Frost Neon Effect in Photoshop?How to create Frost Neon Effect in Photoshop?
How to create Frost Neon Effect in Photoshop?
 
Top 10 design colleges and institutes of india
Top 10 design colleges and institutes of indiaTop 10 design colleges and institutes of india
Top 10 design colleges and institutes of india
 
Best Hollywood poster designers
Best Hollywood poster designersBest Hollywood poster designers
Best Hollywood poster designers
 
Design Principles for All the Designers
Design Principles for All the DesignersDesign Principles for All the Designers
Design Principles for All the Designers
 
Content Writing Tips for SEO
Content Writing Tips for SEOContent Writing Tips for SEO
Content Writing Tips for SEO
 
6 Great Steps to Know to Create Successful Web GUI
6 Great Steps to Know to Create Successful Web GUI6 Great Steps to Know to Create Successful Web GUI
6 Great Steps to Know to Create Successful Web GUI
 

Kürzlich hochgeladen

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Kürzlich hochgeladen (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 

Java script basic

  • 1. JavaScript Basics ADMEC MULTIMEDIA Leader in Animation & Digital Media Education ISO 9001:2008 CERTIFIED | ADOBE Testing Center www.admecindia.co.in
  • 2. Content i. What is JavaScript? ii. Use of JavaScript? iii. Features of JavaScript Popups Variable Scopes Function iv. DATATYPE in JavaScript Number String Undefined Boolean Null v. Operators in JavaScript Assignment Operator Equality Operator Strict Equality Operators
  • 3. What is JavaScript? JavaScript is scripting/programming language. File Extension of JavaScript is ".js”. This extension can be catched by a number of applications including Windows Script Host, Dreamweaver MX, Notepad, Netscape Navigator, PavScrip, UltraEdit. JavaScript is also considered as "assembly language of the web". JavaScript is totally user based. It is does not store any in-built data or function. JavaScript is object oriented. We can also create small objects with help of basic JavaScript.
  • 4. Use of JavaScript? JavaScript is also used to make websites rich and dynamic. Almost every website have JavaScript used in it. It tells how JavaScript important for us. There are plenty of websites and applications which are using JavaScript such as: Gmail, Google, YouTube, Yahoo, LinkedIn, Twitter, Facebook etc...
  • 5. Features of JavaScript POPUPS Popup is additional display box/window surprisingly comes over web browser with information & notice. • Alert: Is any notice to the viewer & provide only option to "OK" after reading. Example: alert('welcome to js'); • Confirm: It is useful to display any of information/ message to viewer which let them decide for accepting & rejecting information with option of "OK" & "CANCEL“ Example: confirm('Are u sure to visit this page?');
  • 6. • Prompt: Take input (info/text/massage/name-- alphabetic value) from Viewers. Example: prompt('Enter ur name plz');
  • 7. VARIABLE: Variable is a kind of container with limited space where we can put value (Numeric, String, Boolean [true/false], objects etc) just for one time if we try to put 2nd value 1st will automatically eliminate. Variable can be identified with unique names. Variable are restricted with some special characters (symbols) like we can only use underscore (_), dollar ($) and Alpha Numeric character. The right way to write variables var myNum = 45; var my_num = 55; var num1 = 11; var num = 78
  • 8. SCOPES: Scope is set of Variable, objects and Function you can use. (Local & Global) Maintain accessibility through variable & function. There are 2 Variable used: Local Variable & Global Variable In Local Scope, Variable is declared within the Function whereas Global Scope, Variable is Declared Outside the function. Data remain secure if we used local Variable.
  • 9. FUNCTION: A function is a group of reusable code which enables a programmer to create a code that is in better organization and execution and which can be called anywhere in your program. In short function eliminates the repetitive writing of same codes. Function helps a programmer to divide a big program into a number of small chunks of program and also helps in managing functions easily & effectively. The most common way to define a function in JavaScript is by using the keyword “function”.
  • 10. Syntax of function: function main() //head of the function, these brackets () are called parenthesis { //body of the function } Types of function: Named Function & Anonymous Function Examples: Named function: function main() { } Note: declared a 'main' function. The name of the function is 'main'.
  • 11. Unnamed function: var main = function () { } Note: Declared an unnamed function and at the same time assigned to a variable 'main'. You can't declare a function without the name so you need to store that in a variable. This type of declaring method of function known as 'closure' in JavaScript.
  • 12. DATATYPE in JavaScript There 5 Primitive Datatypes given below: Number:  A JavaScript programmer all the time have to deal with numbers. It is a value and we use it in various operations in the application or website. Some times you can't get the expected result and either your program gets broken or filled with errors because of non-numeric types of values.  JavaScript offers main 3 functions to convert any of the value to number.  Numbers can be written with or without decimals.
  • 13. Example: var num = 10.25; 1. alert(Number(num)); //10.25 2. alert(parseInt(num)); //10 3. alert(parseFloat(num)); //10.25 String:  String (value) is used to represent text related data. String is also a set of “element” of 16-bit unsigned integer value which start from the first element is ZERO and the next is ONE and so on at index.  We can use string literals in scripts by enclosing them in single or double quotation marks e.g. (‘ ’, “ ”).
  • 14. Example: Single Quotation Mark alert('you clicked on CANCEL'); Double Quotation Mark alert("you clicked on "OK""); Note: In JavaScript, does not have a type to represent a single character. To represent a single character in JavaScript, we have to create a string that contain only single character. A string that contains empty string or zero characters ("") is an empty or string with zero-length. String(value) function can be used to convert any value to string datatype.
  • 15. Undefined: Undefined is a variable which doesn’t have any defined value. Example: var num; // contains no value alert(num);// will get undefined
  • 16. Boolean: Boolean have two values i.e. “true or false” or 1 or 0 and are logical representative. Example: if(confirm('Are you sure to leave this page')){ //you will be redirected to the following URL if above condition is true means if someone clicks on the OK button window.location.href = 'http://www.admecindia.co.in'; }else{ //nothing will happen if someone clicks on CANCEL button as you will receive false as the result return false; } Note: In above example you either get True or False depends on the button you clicked means you are getting a Boolean value.
  • 17. Null: Null is exactly having single value when Null is defined or nothing. Null is considered as an object in JavaScript. var my_value = null; alert(my_value * 20); //0 Note: 1. null gets converted to the false boolean value and i.e. 0 too 2. null and 'null' both are different terms completely 3. null can be used when you want to reset a variable or want to store nothing
  • 18. NOTE There are 2 other datatypes considered according to ECMAScript standard. Symbol: symbol as in primitive datatype which are unique and unchangeable. In some programming language they are also called “atoms”. Object: object data type refers to the structure consist of data & information for working with the data.
  • 19. Operators in JavaScript Types of Operators:  Assignment Operator: The equal sign (=) is called “Assignment” Operators.  Equality Operator: when double the equal sign (==) is called “Equality” Operator. Is also called comparison Operator.  Strict Equality Operators: when Triple the equal sign (===) is called “Strict Equality” Operator. Is also called comparison Operator.
  • 20. Remark These are just the basics of JavaScript and all these topics play a vital role when you create something using JavaScript. As much you are familiar with these basics more you would be strong in JavaScript.
  • 21. Contact Us: ADMEC MULTIMEDIA INSTITUTE C-7/114, IInd Floor, Sector- 7, Rohini, Delhi- 85 Landmark: Near Rohini East Metro Station Helpline 1: +91 9811 818 122 Helpline 2: +91 9911 782 350 ADMEC MULTIMEDIA Leader in Animation & Digital Media Education ISO 9001:2008 CERTIFIED | ADOBE Testing Center ADMEC MULTIMEDIA INSTITUTE For More information you can visit : http://www.admecindia.co.in