SlideShare a Scribd company logo
BY
G.GOWRILATHA,M.Sc(Info Tech)
Department Of CS & IT
Nadar Saraswathi College Of Arts and Science,
Theni.
JavaScript is a lightweight, interpreted
programming language. It is designed for
creating network-centric applications. It is
complimentary to and integrated with Java.
JavaScript is very easy to implement because
it is integrated with HTML. It is open and
cross-platform.
Java script is a dynamic computer programming language.
It is lightweight and most commonly used as a part of web
pages, whose implementations allow client-side script to
interact with the user and make dynamic pages. It is an
interpreted programming language with object-oriented
capabilities.
JavaScript was first known as Live Script, but Netscape
changed its name to JavaScript, possibly because of the
excitement being generated by Java.
Client-side JavaScript is the most common form of the
language. The script should be included in or referenced by
an HTML document for the code to be interpreted by the
browser.
 It means that a web page need not be a static HTML, but
can include programs that interact with the user, control the
browser, and dynamically create HTML content.
 The JavaScript client-side mechanism provides many
advantages over traditional CGI server-side scripts. For
example, you might use JavaScript to check if the user has
entered a valid e-mail address in a form field.
 Less server interaction: you can validate user input
before sending the page off to the server. This saves server
traffic, which means less load on your sever.
 Immediate feedback to the visitors: They don’t have to
wait for a page reload to see if they have forgotten to enter
something.
 Increased Interactivity: you can create interface that
react when the user hovers over them with a mouse or
activates them via the keyboard.
 Richer interface: you can use java Script to include such
items as drag-and-drop components and sliders to give arch
interface to your site visitors.
The <script> tag alerts the browser program to start
interpreting all the text between these tags as a script.
The script tag takes two important attributes:
Language: This attribute specifies what scripting language
you are using. Typically, its value will be java script.
Type: This attribute is what is now recommended to
indicate the scripting language in use and its value should
be set to "text/java script".
<script ...>
JavaScript code
</script>
Java Script allows you to work with three primitive
data types:
 Numbers, eg.,123,120.50 etc.
 Strings of text , eg. “This text String” etc.
 Boolean, eg. True or false.
Java Script also defines two trivial data types, null and
undefined, each of which defines only a single value.
In addition to these primitive data types, JavaScript
supports a composite data type known as object.
,
Like many other programming languages, JavaScript has
variables. Variables can be thought of as named
containers. You can place data into these containers and
then refer to the data simply by naming the container.
Before you use a variable in a JavaScript program, you
must declare it. Variables are declared with the var
keyword as follows.
<script type=“text/javascript”>
<!—
Var money;
Var name;
//-->
</script>
The scope of a variable is the region of your program in
which it is defined. JavaScript variables have only two
scopes.
Global Variables: A global variable has global scope which
means it can be defined anywhere in your JavaScript code.
Local Variables: A local variable will be visible only within a
function where it is defined. Function parameters are
always local to that function.
Within the body of a function, a local variable takes
precedence over a global variable with the same name.
While naming your variables in JavaScript, keep the following
rules in mind.
 You should not use any of the JavaScript reserved keywords as a
variable name. These keywords are mentioned in the next
section. For example, break or Boolean variable names are not
valid.
 JavaScript variable names should not start with a numeral (0-9).
They must begin with a letter or an underscore character. For
example, 123test is an invalid variable name but _123test is a valid
one.
 JavaScript variable names are case-sensitive. For example, Name
and name are two different variables.
•There are three special values in JavaScript that are considered numbers
but
•don’t behave like normal numbers.
•The first two are Infinity and -Infinity, which represent the positive and
negative infinities. Infinity - 1 is still Infinity, and so on. Don’t put too
much trust in infinity-based computation, though. It isn’t
mathematically
sound, and it will quickly lead to the next special number: NaN.
•NaN stands for “not a number”, even though it is a value of the number
type.
•You’ll get this result when you, for example, try to calculate 0 / 0 (zero
divided
by zero), Infinity - Infinity, or any number of other numeric operations
that
don’t yield a meaningful result.
The next basic data type is the string. Strings are used to
represent text. They
are written by enclosing their content in quotes.
`Down on the sea`
"Lie on the ocean"
'Float on the ocean'
You can use single quotes, double quotes, or back ticks to
mark strings, as
long as the quotes at the start and the end of the string
match.
Java script

More Related Content

PPTX
Basics of Javascript
PPTX
Javascript 01 (js)
PPTX
JavaScript with Syntax & Implementation
PPT
Java script
PDF
3. Java Script
PPTX
Java Script
PPTX
Java script
DOC
Basics java scripts
Basics of Javascript
Javascript 01 (js)
JavaScript with Syntax & Implementation
Java script
3. Java Script
Java Script
Java script
Basics java scripts

What's hot (20)

PPT
Javascript
PPTX
Web programming
PPTX
Introduction to Javascript
RTF
Java scripts
PDF
Basic JavaScript Tutorial
PPT
Scripting languages
PPT
Javascript survival for CSBN Sophomores
PPTX
Introduction to JavaScript
PPT
Java Script ppt
PPTX
Javascript functions
PPTX
Javascript
PPTX
Introduction to java script
PPT
Web development basics (Part-4)
PPTX
1. java script language fundamentals
PDF
Client side scripting
PPTX
Java script
DOCX
Java script basics
PPT
Java Script
DOC
2javascript web programming with JAVA script
PPT
OLE-DB vs ODBC
Javascript
Web programming
Introduction to Javascript
Java scripts
Basic JavaScript Tutorial
Scripting languages
Javascript survival for CSBN Sophomores
Introduction to JavaScript
Java Script ppt
Javascript functions
Javascript
Introduction to java script
Web development basics (Part-4)
1. java script language fundamentals
Client side scripting
Java script
Java script basics
Java Script
2javascript web programming with JAVA script
OLE-DB vs ODBC
Ad

Similar to Java script (20)

PPTX
JavaScript New Tutorial Class XI and XII.pptx
PPTX
WT Unit-3 PPT.pptx
PPTX
js.pptx
PPTX
Java script
PPTX
WT JAVASCRIPT
PDF
Javascript tutorial basic for starter
PDF
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
PPTX
Unit 3-Javascript.pptx
PPTX
Chapter 3 INTRODUCTION TO JAVASCRIPT S.pptx
PPTX
JavaScript_III.pptx
PPTX
Unit III.pptx IT3401 web essentials presentatio
PPTX
gdscWorkShopJavascriptintroductions.pptx
PDF
javascriptPresentation.pdf
PPT
JS-Slides-2_74526582652945_73562876535.ppt
PPTX
Lecture 5 javascript
PDF
PPTX
Placement and variable 03 (js)
PDF
JavaScript Getting Started
PPT
Java Script
JavaScript New Tutorial Class XI and XII.pptx
WT Unit-3 PPT.pptx
js.pptx
Java script
WT JAVASCRIPT
Javascript tutorial basic for starter
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
Unit 3-Javascript.pptx
Chapter 3 INTRODUCTION TO JAVASCRIPT S.pptx
JavaScript_III.pptx
Unit III.pptx IT3401 web essentials presentatio
gdscWorkShopJavascriptintroductions.pptx
javascriptPresentation.pdf
JS-Slides-2_74526582652945_73562876535.ppt
Lecture 5 javascript
Placement and variable 03 (js)
JavaScript Getting Started
Java Script
Ad

More from GowriLatha1 (20)

PPTX
Filtering in frequency domain
PPTX
Demand assigned and packet reservation multiple access
PPTX
Software engineering
PPTX
Shadow paging
PPTX
Multithreading
PPTX
PPTX
Web services & com+ components
PPTX
Comparison with Traditional databases
PPTX
Recovery system
PPTX
Comparison with Traditional databases
PPTX
Static analysis
PPTX
Hema dm
PPTX
Data reduction
PPTX
Inter process communication
PPTX
computer network
PPTX
Operating System
PPTX
Data mining query language
PPTX
Enterprice java
PPTX
Ethernet
PPTX
Path &amp; application(ds)2
Filtering in frequency domain
Demand assigned and packet reservation multiple access
Software engineering
Shadow paging
Multithreading
Web services & com+ components
Comparison with Traditional databases
Recovery system
Comparison with Traditional databases
Static analysis
Hema dm
Data reduction
Inter process communication
computer network
Operating System
Data mining query language
Enterprice java
Ethernet
Path &amp; application(ds)2

Recently uploaded (20)

PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PDF
Insiders guide to clinical Medicine.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Lesson notes of climatology university.
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Computing-Curriculum for Schools in Ghana
PDF
RMMM.pdf make it easy to upload and study
PPTX
master seminar digital applications in india
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Classroom Observation Tools for Teachers
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O7-L3 Supply Chain Operations - ICLT Program
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Insiders guide to clinical Medicine.pdf
Supply Chain Operations Speaking Notes -ICLT Program
VCE English Exam - Section C Student Revision Booklet
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Renaissance Architecture: A Journey from Faith to Humanism
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Lesson notes of climatology university.
Abdominal Access Techniques with Prof. Dr. R K Mishra
Computing-Curriculum for Schools in Ghana
RMMM.pdf make it easy to upload and study
master seminar digital applications in india
PPH.pptx obstetrics and gynecology in nursing
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Classroom Observation Tools for Teachers

Java script

  • 1. BY G.GOWRILATHA,M.Sc(Info Tech) Department Of CS & IT Nadar Saraswathi College Of Arts and Science, Theni.
  • 2. JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and cross-platform.
  • 3. Java script is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities. JavaScript was first known as Live Script, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java.
  • 4. Client-side JavaScript is the most common form of the language. The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.  It means that a web page need not be a static HTML, but can include programs that interact with the user, control the browser, and dynamically create HTML content.  The JavaScript client-side mechanism provides many advantages over traditional CGI server-side scripts. For example, you might use JavaScript to check if the user has entered a valid e-mail address in a form field.
  • 5.  Less server interaction: you can validate user input before sending the page off to the server. This saves server traffic, which means less load on your sever.  Immediate feedback to the visitors: They don’t have to wait for a page reload to see if they have forgotten to enter something.  Increased Interactivity: you can create interface that react when the user hovers over them with a mouse or activates them via the keyboard.  Richer interface: you can use java Script to include such items as drag-and-drop components and sliders to give arch interface to your site visitors.
  • 6. The <script> tag alerts the browser program to start interpreting all the text between these tags as a script. The script tag takes two important attributes: Language: This attribute specifies what scripting language you are using. Typically, its value will be java script. Type: This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/java script". <script ...> JavaScript code </script>
  • 7. Java Script allows you to work with three primitive data types:  Numbers, eg.,123,120.50 etc.  Strings of text , eg. “This text String” etc.  Boolean, eg. True or false. Java Script also defines two trivial data types, null and undefined, each of which defines only a single value. In addition to these primitive data types, JavaScript supports a composite data type known as object. ,
  • 8. Like many other programming languages, JavaScript has variables. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows. <script type=“text/javascript”> <!— Var money; Var name; //--> </script>
  • 9. The scope of a variable is the region of your program in which it is defined. JavaScript variables have only two scopes. Global Variables: A global variable has global scope which means it can be defined anywhere in your JavaScript code. Local Variables: A local variable will be visible only within a function where it is defined. Function parameters are always local to that function. Within the body of a function, a local variable takes precedence over a global variable with the same name.
  • 10. While naming your variables in JavaScript, keep the following rules in mind.  You should not use any of the JavaScript reserved keywords as a variable name. These keywords are mentioned in the next section. For example, break or Boolean variable names are not valid.  JavaScript variable names should not start with a numeral (0-9). They must begin with a letter or an underscore character. For example, 123test is an invalid variable name but _123test is a valid one.  JavaScript variable names are case-sensitive. For example, Name and name are two different variables.
  • 11. •There are three special values in JavaScript that are considered numbers but •don’t behave like normal numbers. •The first two are Infinity and -Infinity, which represent the positive and negative infinities. Infinity - 1 is still Infinity, and so on. Don’t put too much trust in infinity-based computation, though. It isn’t mathematically sound, and it will quickly lead to the next special number: NaN. •NaN stands for “not a number”, even though it is a value of the number type. •You’ll get this result when you, for example, try to calculate 0 / 0 (zero divided by zero), Infinity - Infinity, or any number of other numeric operations that don’t yield a meaningful result.
  • 12. The next basic data type is the string. Strings are used to represent text. They are written by enclosing their content in quotes. `Down on the sea` "Lie on the ocean" 'Float on the ocean' You can use single quotes, double quotes, or back ticks to mark strings, as long as the quotes at the start and the end of the string match.