Javascript

what is javascipt ?
Javascript is a interpreted scripting dynamically typed object programming language.It is used to behaviour of web pages.It can calculate,manipulate and validate data.supports mutliple paradigm such as imperative,functional and ob…


This content originally appeared on DEV Community and was authored by Bharath kumar

what is javascipt ?
Javascript is a interpreted scripting dynamically typed object programming language.It is used to behaviour of web pages.It can calculate,manipulate and validate data.supports mutliple paradigm such as imperative,functional and object oriented. the scripting language for Web pages.
object-oriented scripting language used to make webpages interactive (e.g., having complex animations, clickable buttons, popup menus, etc.).

Interperted:
Means translate the source code to machine code.
Dynamical:
It is automatically find the what type of data in run time of execution the program.
scripting:
It is describe the line by line read the program code and execution.
object oriented:
Object-oriented (OO) is
a programming model that structures software around data, or "objects," instead of functions and logic.Objects combine data (properties) and the methods (functions) that operate on that data.

variables declaration:
there are three types:
var,let,const
Variables in JavaScript are named containers for data.
let:
Declares a block-scoped variable that can be reassigned.

let age = 30;
age = 31; // This is allowed

const:
Declares a block-scoped variable whose value cannot be reassigned after it's initialized.

const pi = 3.14;

var:
An older way to declare a variable. It is function-scoped or globally-scoped and can be redeclared and reassigned.

var count = 5;
var count = 10; // This is allowed

Rules for identifiers of varaiables:
Valid characters: Can contain letters, numbers, underscores (_), and dollar signs ($). Numbers are not allowed as the first character.
Case-sensitive: myVariable is different from myvariable.
Cannot be reserved words: You cannot use JavaScript's keywords (like if, for, function) as variable names.

Data types:

1. Number:Represents numeric values (integers and decimals).
let n = 42;
2. String: Represents text enclosed in single or double quotes.
let s = "Hello, World!";
3. Boolean: Represents a logical value (true or false).
let bool= true;
4. Undefined: A variable that has been declared but not assigned a value.
let notAssigned;
console.log(notAssigned);

Output:

undefined

5. Null: Represents an intentional absence of any value.

let empty = null;

6. Symbol: Represents unique and immutable values, often used as object keys.

let sym = Symbol('unique');

7. BigInt: Represents integers larger than Number.MAX_SAFE_INTEGER.

let bigNumber = 123456789012345678901234567890n;

Non-Primitive Datatypes

Non-primitive types are objects and can store collections of data or more complex entities.

1. Object: Represents key-value pairs.

let obj = {
name: "Amit",
age: 25
};

2. Array: Represents an ordered list of values.

let a = ["red", "green", "blue"];

3. Function: Represents reusable blocks of code.

function fun() {
console.log("GeeksforGeeks");
}

Exploring JavaScript Datatypes and Variables: Understanding Common Expressions

console.log(null === undefined)

Expression: null === undefined
Result: false


This content originally appeared on DEV Community and was authored by Bharath kumar


Print Share Comment Cite Upload Translate Updates
APA

Bharath kumar | Sciencx (2025-11-30T06:54:04+00:00) Javascript. Retrieved from https://www.scien.cx/2025/11/30/javascript-12/

MLA
" » Javascript." Bharath kumar | Sciencx - Sunday November 30, 2025, https://www.scien.cx/2025/11/30/javascript-12/
HARVARD
Bharath kumar | Sciencx Sunday November 30, 2025 » Javascript., viewed ,<https://www.scien.cx/2025/11/30/javascript-12/>
VANCOUVER
Bharath kumar | Sciencx - » Javascript. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/30/javascript-12/
CHICAGO
" » Javascript." Bharath kumar | Sciencx - Accessed . https://www.scien.cx/2025/11/30/javascript-12/
IEEE
" » Javascript." Bharath kumar | Sciencx [Online]. Available: https://www.scien.cx/2025/11/30/javascript-12/. [Accessed: ]
rf:citation
» Javascript | Bharath kumar | Sciencx | https://www.scien.cx/2025/11/30/javascript-12/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.