0% found this document useful (0 votes)
2 views

Javascript

The document provides an overview of JavaScript, detailing its eight data types: String, Number, BigInt, Boolean, Undefined, Null, Symbol, and Object. It also explains control statements used for decision-making and iteration, as well as the types of dialog boxes available in JavaScript, including Alert, Prompt, and Confirm. The content is structured to serve as a basic guide for understanding JavaScript fundamentals.

Uploaded by

yashik kakkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Javascript

The document provides an overview of JavaScript, detailing its eight data types: String, Number, BigInt, Boolean, Undefined, Null, Symbol, and Object. It also explains control statements used for decision-making and iteration, as well as the types of dialog boxes available in JavaScript, including Alert, Prompt, and Confirm. The content is structured to serve as a basic guide for understanding JavaScript fundamentals.

Uploaded by

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

Javascript MADE BY : SAISHA

YASHIK
GARGI
MAYANK
Index

JavaScript datatypes
Control statement
dialogue box
Data types
 JavaScript has 8 Datatypes :

String
Number
Bigint
Boolean
Undefined
Null
Symbol
Object
String

JavaScript strings are immutable. This


means that once a string is created,
it is not possible to modify it. It is
easy to build complex strings with
concatenation. The string type
represents textual data and is
encoded as a sequence of 16-bit
unsigned integer values .
Number

The Number type has only one value


with multiple representations: 0 is
represented as both -
0 and +0 (where 0 is an alias for +0).
In practice, there is almost no
difference between the different
representations; for example, +0 ===
-0 is true.
Bignit

 BigIntvalues are neither always more precise


nor always less precise than numbers, since
BigInts cannot represent fractional numbers,
but can represent big integers more
accurately. Neither type entails the other, and
they are not mutually substitutable. f BigInt
values are mixed with regular numbers in
arithmetic expressions, or if they are
implicitly converted to each
Other .
Boolean

 The Boolean value of an expression is the basis for


all JavaScript comparisons and conditions.
 Very often, in programming, you will need a data
type that can only have one of two values, like
YES / NO
ON / OFF
TRUE / FALSE
For this, JavaScript has a Boolean data type. It can
only take the values true or false.
Undefined

 TheUndefined type is inhabited by exactly one


value which is undefined .
it is a primitive value undefined, when a
variable is declared and not initialized or not
assigned with any value. By default, the variable
was stored with an Undefined value.
Undefined is a global read-only variable that
represents the value Undefined. Undefined is a
type of primitive type
Null

 InJavaScript, `null` indicates the


deliberate absence of any object value.
It’s a primitive value that denotes the
absence of a value or serves as a
placeholder for an object that isn’t
present. `null` differs from `undefined`,
which signifies a variable that has been
declared but hasn’t been assigned a
value.
symbol

 The Symbol() function also accepts an


optional object parameter. This object
can be used to create a global Symbol,
which can be accessed from anywhere in
the code. A global Symbol can be
created by passing in an object with a
'global' property set to true.
Object

A javaScript object is an entity having state and behavior


(properties and method). For example: car, pen, bike, chair, glass,
keyboard, monitor etc.
JavaScript is an object-based language. Everything is an object in
JavaScript.
JavaScript is template based not class based. Here, we don't create
class to get the object. But, we direct create objects.
Control statement in
JavaScript
 JavaScript control statement is used to control the execution of a
program based on a specific condition. If the condition meets then a
particular block of action will be executed otherwise it will execute another
block of action that satisfies that particular condition.
 Types of Control Statements in JavaScript
• Conditional Statement: These statements are used for decision-making,
a decision is made by the conditional statement based on an expression
that is passed. Either YES or NO.
• Iterative Statement: This is a statement that iterates repeatedly until a
condition is met. Simply said, if we have an expression, the statement will
keep repeating itself until and unless it is satisfied.
dialogue box

 Dialogue boxes are a kind of popup notification, this kind of


informative functionality is used to show success, failure, or any
particular/important notification to the user.
 JavaScript uses 3 kinds of dialog boxes:
• Alert : An alert box is used on the website to show a warning
message to the user that they have entered the wrong value other
than what is required to fill in that position.

• Prompt : A prompt box is often used if you want the user to input a value before
entering a page. When a prompt box pops up, the user will have to click either “OK”
or “Cancel”

• Confirm : A confirm box is often used if you want the user to verify or accept
something. When a confirm box pops up, the user will have to click either “OK” or
“Cancel” to proceed.

You might also like