Data types of javascript summary | chai aur #javascript

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Return type of variables in JavaScript
1) Primitive Datatypes
Number => number
String => string
Boolean => boolean
null => object
undefined => undefined
Symbol => symbol
BigInt => bigint

2) Non-primitive Datatypes
Arrays => object
Function => function
Object => object

ankita-vzrb
Автор

JavaScript is a dynamically typed language. This means that variable types are determined at runtime, and you do not need to explicitly declare the type of a variable before using it. You can assign different types of values to a variable during its lifetime.

For example, in JavaScript, you can do the following:

let x = 10; // x is now a number
x = "Hello"; // x is now a string
x = true; // x is now a boolean
On the other hand, statically typed languages require you to declare the variable's type explicitly, and the type checking is done at compile-time, before the code is executed.

Languages like Java, C++, and TypeScript are statically typed, and they require you to specify the variable type explicitly when declaring them:

int x = 10; // x is a variable of type int
String name = "John"; // name is a variable of type String
JavaScript's dynamic typing allows for more flexibility but can lead to potential runtime errors if not handled carefully. Static typing, on the other hand, provides better type safety at the cost of some initial verbosity and strictness.

promahbubul
Автор

Primitive DataTypes:


1.Number: Represents both integer and floating-point numbers. Example: 5, 3.14.

2.String: Represents a sequence of characters enclosed in single or double quotes. Example: "Hello, world!".

3, Boolean: Represents a binary value, either true or false, often used for conditional logic.

4.Undefined: Represents a variable that has been declared but hasn't been assigned a value yet. Example: let x;.

5.Null: standalone value it is represenataion of empty value it is special type and it is a object type. Example: let y = null;

6.Symbol (ES6): it is mostly used used to find uniqnece.

7.BigInt (ES11): Represents large integers that cannot be represented by the Number type.

Refence (Object Data Types):

1.Object: Represents a collection of key-value pairs (properties and methods). Example: { name: "John", age: 30 }.

2.Array: Represents a list-like collection of values, indexed by numbers (integer indices). Example: [1, 2, 3, 4].

3.Function: Represents a reusable block of code that can be invoked or called with arguments. Example: function add(x, y) { return x + y; }.

4.Date: Represents dates and times.

5.RegExp: Represents regular expressions for pattern matching.



lets talk about some Range of Primitive DataType:

1.Number:
Represents both integers and floating-point numbers.
Typical Range: -9, 007, 199, 254, 740, 992 (-2^53) to 9, 007, 199, 254, 740, 992 (2^53) inclusive.
Smallest Increment: 2^(-52).

2.String:
Represents a sequence of characters.
No specific range limit, but practical limits depend on memory and system resources.

3.Boolean:
Represents true or false.
Only two possible values: true and false.

4.Undefined:
Represents a variable that has been declared but hasn't been assigned a value.
It has only one possible value: undefined.

5.Null:
Represents the intentional absence of any object or value.
It has only one possible value: null.

6.Symbol (ES6):
Represents a unique and immutable value.
No specific range limit.

7.BigInt (ES11):
Represents large integers that cannot be represented by the Number type.
The range is practically unlimited and depends on available memory.

PakIslamicTunes
Автор

Thank you sir for your guidance and hard work here is your gift

* Premitive Datatypes

Type typeof

i) Number number
ii) String string
iii) Boolean boolean
iv) Bigint bigint
v) Symbol symbol
vi) Null object
vii) Undefined undefined


* Non-Premitive OR Referance OR Object datatype

Type typeof

i) Object object
ii) Array object
iii) Function function(object)

This is my research and output if anythig is wrong please feel proud to reply me

Thank you sir

developer_vikash
Автор

JavaScript is a dynamically typed language. Because data type will automatically assigned at the time of compilation or code execution.

ankushladani
Автор

Primitive datatypes:
String - string
Number - number
Boolean - Boolean
Null - object(****)
Undefined - undefined
BigInt - bigint

Non-primitive datatypes:
Array - object
Function - function(object)
Object - object

VanisTastyTreat
Автор

when you say "sirf padhna thode hai, interviews bhi crack karne hain" that thing makes your JS tutorials different and unique from others. Although I am writing this comment in English but I just...can't tell you how much this Hindi tutorials are helping me as well as thousand others #ThankYouHiteshSir❤❤

jerrysworld
Автор

JavaScript is a dynamically typed language, which means that data types of variables are determined by the value they hold at runtime and can change throughout the program as we assign different values to them.

Thank you sir for your Hard work and guidance ❤

hksworld
Автор

Sir When you said this "sirf padhna thode hai, interviews bhi crack karne hain" hits different and motivate to learn from you. #thankyouhiteshsir for making such valuable Javascript course playlist

rupeshshah
Автор

Sir at 14:18, bigNumber ka value isliye undefined aaya kyuki aapne uski declaration ko hi comment kr diya tha 😅
When I tried that declaration myself, it shows the type to bigint 👨‍💻

peacecode
Автор

"Chai aur Code, you've made JavaScript feel like a breeze. Your passion for teaching shines through!"

BitFire
Автор

ab tak ka sabse shandar channel, apka padhane ka tareeka real me best h bhaiya

eco-wonders
Автор

Really sir this series is awesome from the courses thanks your explanation like this way admirable things that you are doing.

sanjayrajpoot
Автор

Primitive Data Types:

Number -> Example: 42
String -> Example: "Hello, World"
Boolean -> Example: true
null -> Example: null
undefined -> Example: undefined
Symbol -> Example: Symbol("unique")
Non-Primitive Data Types:

Array -> Example: var fruits = ['apple', 'banana', 'cherry']
Function -> Example:
function greet(name) {
console.log("Hello, " + name + "!");
}

hitendrasingh
Автор

JavaScript dynamically typed language hai. Iska matlab hai ki variables ka type (jaise string, number, boolean, etc.) runtime par determine hota hai, na ki compile time par.
Example =>
let variable = 10; // Abhi variable ka type 'number' hai
console.log(typeof variable); // Output: 'number'

variable = "Hello"; // Ab variable ka type 'string' ho gaya
console.log(typeof variable); // Output: 'string'

aizajsamani
Автор

There are mainly 2 types of datatypes :
1. Primitive ( call by value = copy version ):
- string => string
- number => number
- Boolean => boolean
- null => object
- undefined => undefined
- symbol => symbol
- Bigint => Bigint

2. Non-Primitive ( reference type ):
- Array => object
- Object => object
- Function => Object Function

3. JavaScript is "Dynamically typed language" because all type checks are being performed during Runtime .

tamalmajumdar
Автор

Return type of variables in JavaScript
Primitive Datatypes
1) Number => number
2) String => string
3) Boolean => boolean
4) null => object
5) undefined => undefined
6) Symbol => symbol
7) BigInt => bigint

AsgareeKhatoon-vp
Автор

There are two categories of data types:

1)Primitive: These are call-by-value. The types of primitive data types include String, Number, Boolean, Null, Undefined, Symbol, and BigInt. Note that Symbols uniquely identify variables, even if two variables have the same data and data type. Primitive variables datatype is same but null datatype is object
2) Non-primitive: These are call-by-reference. The types of non-primitive data types are Array, Object, and Function. The data type for these is 'object, ' but for functions, they return a data type of 'function, ' though they also have an object data type.

softheartpeople
Автор

Once again your way of teaching extra ordinary sir .

Daani
Автор

finally wait is end. Very helpful lecture, Hope content will continue. ☑☑☑☑

vivektiwari
visit shbcf.ru