S.Muthuganesh M.Sc.,B.Ed.,
Assistant Professor
Department of Computer Science
Vivekananda College
Introduction
• Javascript as it lightweight dynamic programming language.
• Programs in this language are called Scripts.
• JavaScript often abbreviated JS, is a programming language that is
one of the core technologies of the World Wide Web,
alongside HTML and CSS.
• JavaScript can be implemented using JavaScript statements that are
placed within the <script>... </script> HTML tags in a web page.
Advantages
• Simplicity
JavaScript is relatively simple to learn and implement.
• Speed
JavaScript is an ‘interpreted’ language, it reduces the time required by other
programming languages.
• Popularity
JavaScript is used everywhere on the web.
• Web Development
JavaScript is commonly used for creating web pages. It allows us to add dynamic
behavior to the webpage and add special effects to the webpage. On websites, it is
mainly used for validation purposes.
• Games
Create games that operate inside the browser.
How to Run
• Open any text editor(eg: notepad, notepad++ etc.)
<html>
<head>
<title>First program</title>
<script type=“text/javascript”>
</script>
</head>
<body>
document.wite(“Hello Welcome”);
</body>
</html>
• Save as demo.html
• Run in any browser
variable
• A JavaScript variable is simply a name of the value.
• There are two types of variables in JavaScript : local variable and global
variable.
• There are some rules while declaring a JavaScript variable (also known as
identifiers).
1. Name must start with a letter (a to z or A to Z), underscore( _ )
2. After first letter we can use digits (0 to 9)
3. JavaScript variables are case sensitive, for example x and X are different
variables.
Data types
• JavaScript is a dynamic type language, means you don't need to
specify type of the variable.
• You need to use var here to specify the data type. It can hold any type
of values such as numbers, strings etc.
Data Type Description
String represents sequence of characters e.g.
"hello"
Number represents numeric values e.g. 100
Boolean represents boolean value either false or
true
Null represents null i.e. no value at all
NAN Not a Number
document.write()
• This is used to display a given text in a web page.
Syntax
document.write(“Statements”);
document.write(“Helloworld!!!”);
Dialog Boxes
• JavaScript supports three important types of dialog boxes
• Alert Dialog Box
An alert dialog box is mostly used to give a warning message to the users.
Alert box gives only one button "OK" to select and proceed.
• Confirmation Dialog Box
A confirmation dialog box is mostly used to take user's consent on any option.
It displays a dialog box with two buttons: OK and Cancel.
If the user clicks on the OK button, will return true.
If the user clicks on the Cancel button, then will return false
• Prompt Dialog Box
The prompt dialog box is very useful when you want to pop-up a text box to get
user input. Thus, it enables you to interact with the user. The user needs to fill in the field
and then click OK.
JavaScript Operators
• JavaScript operators are symbols that are used to perform operations
on operands
There are following types of operators in JavaScript.
Arithmetic Operators(+,-,*,/,%)
Comparison (Relational) Operators(<,>,<=,>=,==,===,!=,!==)
Bitwise Operators(&,|,~,<<,>>)
Logical Operators(&&,||,!)
Assignment Operators(=,+=,-=,*=,/=,%=)
Thank you

More Related Content

PPT
Javascript
PPTX
javascript client side scripting la.pptx
PPTX
copa-ii.pptx
PPTX
Introduction to JAVA SCRIPT USING HTML and CSS
PDF
javascriptPresentation.pdf
PPTX
Lecture 5 javascript
PPTX
JavaScripts & jQuery
PPTX
Java script.pptx v
Javascript
javascript client side scripting la.pptx
copa-ii.pptx
Introduction to JAVA SCRIPT USING HTML and CSS
javascriptPresentation.pdf
Lecture 5 javascript
JavaScripts & jQuery
Java script.pptx v

Similar to javascript.pptx (20)

PPTX
WT Unit-3 PPT.pptx
PPTX
Learning space presentation1 learn Java script
PPTX
Java script
PDF
Lecture17 ie321 dr_atifshahzad_js
PPTX
Chapter 3 INTRODUCTION TO JAVASCRIPT S.pptx
PDF
PPTX
1. java script language fundamentals
PPTX
Final Java-script.pptx
PPTX
Java script
PPTX
JavaScript Lecture notes.pptx
PDF
Client sidescripting javascript
PPTX
Web designing unit 4
PDF
Unit 4(it workshop)
PPTX
CSC PPT 12.pptx
PPT
Java script
PDF
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
PPTX
Javascript
PPTX
js.pptx
PPTX
HNDIT1022 Week 08, 09 10 Theory web .pptx
WT Unit-3 PPT.pptx
Learning space presentation1 learn Java script
Java script
Lecture17 ie321 dr_atifshahzad_js
Chapter 3 INTRODUCTION TO JAVASCRIPT S.pptx
1. java script language fundamentals
Final Java-script.pptx
Java script
JavaScript Lecture notes.pptx
Client sidescripting javascript
Web designing unit 4
Unit 4(it workshop)
CSC PPT 12.pptx
Java script
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
Javascript
js.pptx
HNDIT1022 Week 08, 09 10 Theory web .pptx
Ad

More from Muthuganesh S (12)

PPTX
Operation Research VS Software Engineering
DOC
PPTX
PPTX
Conditional statement in c
PPTX
Input output statement in C
PDF
Php notes
PPTX
Php Basics Iterations, looping
PPTX
PHP Basics
PPTX
PPTX
Introduction to c
PPTX
Javascript dom
Operation Research VS Software Engineering
Conditional statement in c
Input output statement in C
Php notes
Php Basics Iterations, looping
PHP Basics
Introduction to c
Javascript dom
Ad

Recently uploaded (20)

PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Trump Administration's workforce development strategy
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Introduction to pro and eukaryotes and differences.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PDF
HVAC Specification 2024 according to central public works department
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Trump Administration's workforce development strategy
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Practical Manual AGRO-233 Principles and Practices of Natural Farming
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Introduction to pro and eukaryotes and differences.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
History, Philosophy and sociology of education (1).pptx
Virtual and Augmented Reality in Current Scenario
Complications of Minimal Access-Surgery.pdf
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
B.Sc. DS Unit 2 Software Engineering.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
Weekly quiz Compilation Jan -July 25.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Uderstanding digital marketing and marketing stratergie for engaging the digi...
HVAC Specification 2024 according to central public works department
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf

javascript.pptx

  • 1. S.Muthuganesh M.Sc.,B.Ed., Assistant Professor Department of Computer Science Vivekananda College
  • 2. Introduction • Javascript as it lightweight dynamic programming language. • Programs in this language are called Scripts. • JavaScript often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. • JavaScript can be implemented using JavaScript statements that are placed within the <script>... </script> HTML tags in a web page.
  • 3. Advantages • Simplicity JavaScript is relatively simple to learn and implement. • Speed JavaScript is an ‘interpreted’ language, it reduces the time required by other programming languages. • Popularity JavaScript is used everywhere on the web. • Web Development JavaScript is commonly used for creating web pages. It allows us to add dynamic behavior to the webpage and add special effects to the webpage. On websites, it is mainly used for validation purposes. • Games Create games that operate inside the browser.
  • 4. How to Run • Open any text editor(eg: notepad, notepad++ etc.) <html> <head> <title>First program</title> <script type=“text/javascript”> </script> </head> <body> document.wite(“Hello Welcome”); </body> </html> • Save as demo.html • Run in any browser
  • 5. variable • A JavaScript variable is simply a name of the value. • There are two types of variables in JavaScript : local variable and global variable. • There are some rules while declaring a JavaScript variable (also known as identifiers). 1. Name must start with a letter (a to z or A to Z), underscore( _ ) 2. After first letter we can use digits (0 to 9) 3. JavaScript variables are case sensitive, for example x and X are different variables.
  • 6. Data types • JavaScript is a dynamic type language, means you don't need to specify type of the variable. • You need to use var here to specify the data type. It can hold any type of values such as numbers, strings etc. Data Type Description String represents sequence of characters e.g. "hello" Number represents numeric values e.g. 100 Boolean represents boolean value either false or true Null represents null i.e. no value at all NAN Not a Number
  • 7. document.write() • This is used to display a given text in a web page. Syntax document.write(“Statements”); document.write(“Helloworld!!!”);
  • 8. Dialog Boxes • JavaScript supports three important types of dialog boxes • Alert Dialog Box An alert dialog box is mostly used to give a warning message to the users. Alert box gives only one button "OK" to select and proceed. • Confirmation Dialog Box A confirmation dialog box is mostly used to take user's consent on any option. It displays a dialog box with two buttons: OK and Cancel. If the user clicks on the OK button, will return true. If the user clicks on the Cancel button, then will return false • Prompt Dialog Box The prompt dialog box is very useful when you want to pop-up a text box to get user input. Thus, it enables you to interact with the user. The user needs to fill in the field and then click OK.
  • 9. JavaScript Operators • JavaScript operators are symbols that are used to perform operations on operands There are following types of operators in JavaScript. Arithmetic Operators(+,-,*,/,%) Comparison (Relational) Operators(<,>,<=,>=,==,===,!=,!==) Bitwise Operators(&,|,~,<<,>>) Logical Operators(&&,||,!) Assignment Operators(=,+=,-=,*=,/=,%=)