0% found this document useful (0 votes)
17K views2 pages

What Is Javascript?: Foo Foo Foo

JavaScript is a scripting language that allows dynamic typing and supports client-side scripting to add interactivity to HTML pages. It has six primitive data types - Boolean, Null, Undefined, Number, String, and Symbol - and one object type. Variables in JavaScript are declared with "var" and don't require data typing, as their type is determined automatically based on the data assigned to them.

Uploaded by

Lanke Dhanaraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17K views2 pages

What Is Javascript?: Foo Foo Foo

JavaScript is a scripting language that allows dynamic typing and supports client-side scripting to add interactivity to HTML pages. It has six primitive data types - Boolean, Null, Undefined, Number, String, and Symbol - and one object type. Variables in JavaScript are declared with "var" and don't require data typing, as their type is determined automatically based on the data assigned to them.

Uploaded by

Lanke Dhanaraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

What is JavaScript?

JavaScript is a scripting language and it supports client side scripting.


JavaScript is a lightweight, interpreted programming language with object-oriented
capabilities
that allows you to build interactivity into otherwise static HTML pages.

Dynamic typing
JavaScript is a loosely typed or a dynamic language. That means you don't have to
declare the type of a variable ahead of time. The type will get determined
automatically while the program is being processed. That also means that you can
have the same variable as different types:
var foo = 42; // foo is now a Number
var foo = "bar"; // foo is now a String
var foo = true; // foo is now a Boolean

JavaScript support all the primitive data types like


Six data types that are primitives:
1.
2.
3.
4.
5.
6.
7.

Boolean
Null
Undefined
Number
String
Symbol (new in ECMAScript 6)
and Object

Boolean type:Boolean represents a logical entity and can have two values: true, and false.
Null type:The Null type has exactly one value: null.
Undefined type:A variable that has not been assigned a value has the value undefined.

Var is the keyword used in JavaScript for declaring the


variable. The value to the variable can be assigned at the time of declaring the
variable or at any point of time in the program. We need not declare data type for
the variables. The variables in JavaScript are flexible and adjust itself to the type of
data assigned to it.
A number of variables can also be declared with a var keyword separated by
comma.

E.g.: var name, age;

Variables in JavaScript are case sensitive. Variable name and Name are two different
variables
whereas name and Name are the same variables in ABAP.

You might also like