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
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.
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.
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
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❤❤
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 ❤
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
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'
The Datatype of various values in Javascript are as follows: *)Primitives;-> undefined->undefined. null->object . number->number. Symbol->Symbol. String->String. BigInt->BigInt. Boolean->boolean. *)Non-Primitives-> Arrays->objects. object->objects. Funcitons->function or function objects. Do give your suggestions on this if you find some difficulty or mistakes ..🙏🙏😉😉
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 👨💻
@@deepakshukla1810 it was defined, but when sir was commenting out console.logs , in order to provide a cleaner output, he mistakenly commented the declaration of bigNumber.
JavaScript ek "dynamically typed" language hai, yani ki isme variable ki data type runtime (execution time) par decide hoti hai, aur aap ek variable mein alag-alag data types ke values store kar sakte hain. JavaScript mein aap ek variable ko pehle number, phir string, aur phir boolean ke roop mein istemal kar sakte hain, aur interpreter runtime par type checks karta hai.
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.
Thank you for making such a beautiful javascript tutorial. Because You teach the actual javascript which is necessary for actual production development need. Very Very thank you. I will share your channel as much as possible to everyone. I really like your teaching style and I aslo need that type of javascript teacher. God bless you.
Type and typeof return value number - number string - String boolean - boolean symbol - symbol bigint - bigint undefined - undefined null - object array - object object - object function - function
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 .
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...
At 13:57, You commented the variable declaration, that's why the typeof of BigInt value is showing 'undefined' because it couldn't find the variable. The actual typeof value of any BigInt variable is bigint and not undefined.
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. Return types of variables in js: Primitive datatypes: Number =>number String => string Boolean => boolean null => object undefined => undefined Symbol => symbol BigInt => bigint Reference (Non primitive data types): Array => object Object => object Function => function
JavaScript is dynamically types language because data type will automatically assigned at the time of compilation or code execution. TypeScript is statically typed language.
Really you made this interesting, I have completed JS course 3 times , 2 from UA-cam ane 1 is paid course, but still I am blank, but now I feel confident in JS, so thanks you
02:16 JavaScript data types can be categorized into primitive and non-primitive types. 04:32 Primitive data types in JavaScript 06:48 JavaScript data types 09:04 JavaScript data types include numbers, booleans, null, and undefined 11:20 Symbol and BigInt data types 13:36 Arrays and objects are non-primitive types in JavaScript 15:52 Using typeof function to find data types of variables 18:02 The return type for all non-primitive types is object function.
return type of variables in JS 1- primitive:- number => number string => string 2- Non-primitive Myobj => object myfunction => function bignumber => bigint or big number
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.
for typeof operator:for non primitive datatypes: arr, object:object and for function :object function for primitive datatype: Number => number String => string Boolean => boolean null => object undefined => undefined Symbol => symbol BigInt => bigint
02:16 JavaScript data types can be categorized into primitive and non-primitive types. 04:32 Primitive data types in JavaScript 06:48 JavaScript data types 09:04 JavaScript data types include numbers, booleans, null, and undefined 11:20 Symbol and BigInt data types 13:36 Arrays and objects are non-primitive types in JavaScript 15:52 Using typeof function to find data types of variables 18:02 The return type for all non-primitive types is object function.
02:16 JavaScript data types can be categorized into primitive and non-primitive types. 04:32 Primitive data types in JavaScript 06:48 JavaScript data types 09:04 JavaScript data types include numbers, booleans, null, and undefined 11:20 Symbol and BigInt data types 13:36 Arrays and objects are non-primitive types in JavaScript 15:52 Using typeof function to find data types of variables 18:02 The return type for all non-primitive types is object function. Crafted by Merlin AI.
Javascript is dynamically typed language which means agar program me aage jakar variables ki value ka datatype change hota hai toh Javascript variables ke value ke current datatype ko hi valid manegi. Jo mujhe samaj aaya vo kuch aisa tha.
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 so much sir for these amazing tutorials 🥰🙌
dynamically typed language 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
sir it is dynamic typed language because it assigned data type to a variable according to given value unlike typescript or c++ etc before declaring a variable we define its data type with a reserved word.
JavaScript is a dynamically typed language, which means that variables in JavaScript can hold values of any type, and the type of a variable can change at runtime. This flexibility allows for more fluid and adaptable programming, where you don't have to declare the type of a variable explicitly before using it.
"Hey Chai or Code and Hitesh Choudhary, I'm on the edge of my seat in anticipation for the backend full series and DSA series on this channel! ☕💻 Your content is like the perfect blend of coding wisdom and the soothing essence of chai, and I can't wait to dive deep into these topics with your expert guidance. Keep brewing up those fantastic tutorials, and I'll keep sipping and coding along! 🚀🔥"
Sir 6:35 Answer is Dynamically Type language ha kyuki sir hum runtime par variable ki value ko change kar sakte ha..And sir gazab videos ha Js ki.Thank you so much sir..
Hi Hitesh, I noticed a small mistake in the video. You commented out the variable bigNumber, which caused it to show undefined when you checked the datatype. When you check the datatype of an undefined variable, it shows undefined. If you hadn't commented it out, you would have seen Bigint as the datatype for bigNumber. Despite this minor error, I have to say I respect the effort you put into this course. I'm really enjoying it and appreciate the detailed explanations. Thank you for offering such a comprehensive JavaScript course for free!
JavaScript is a dynamic language. This means that variables in JavaScript are not explicitly typed, and their types can change during the execution of a program. Additionally, JavaScript allows for features like dynamic typing, where variables can hold values of any type, and dynamic evaluation, where code can be constructed and executed at runtime.
JavaScript is a dynamically typed language. In a dynamically typed language like JavaScript, variable types are determined at runtime, not at compile time. This means that you don't have to explicitly declare the data type of a variable when you create it, and you can change the type of a variable by assigning a value of a different type to it during the execution of the program.
Primitive Datatypes ka return type String => String Number => Number Boolean => Boolean Null => Object Undefined => Undefined Symbol => Symbol BigInt => BigInt Reference Datatypes ka return type Array => Object Object => Object Function => Function
JavaScript is dynamically typed. This means that variable types are determined at runtime, rather than being explicitly declared in the code. In JavaScript, a variable can hold different types of values at different points in the program's execution. This dynamic typing allows for flexibility but also requires careful attention to data types to prevent unexpected behaviors.
JavaScript is a dynamically typed language, meaning variable types are determined at runtime rather than being explicitly declared. This allows variables to change types during execution, providing flexibility but potentially leading to runtime errors if not managed carefully. You don’t have to declare a variable’s type when you create it. For example, you can assign a value to a variable without specifying whether it’s a number, string, or any other type let myVariable = 10; // Initially a number myVariable = "Hello"; // Now it's a string In a statically typed language (like Java or TypeScript), you would need to declare the type of the variable explicitly, and it wouldn’t change during the program’s execution int myVariable = 10; // Must always be an integer
There are 2 data types in Js 1. Primitives 2. Reference (Non Primitives) Primitives: 1. Number Example: let number = 100 2. String Example: let string = "Namaskar" 3. Boolean Example: let isPurchased = false 4. Undefined Example: let subscribe; 5. Null Example: let like = null 6. Symbol Example: const share = ("100") 7. BigInt Example: const number = 100000000000n Reference: 1. Arrays Example: let objectArrays = [1,2,3] 2. Objects Example: let video = { subscribed: true, like: true, share: false } 3. Function Example: function sheryiansStudent() { canMakeAwesomeWebs: true }
JavaScript ek dynamically typed language hai, jisme variable ke types ko runtime par decide kiya jata hai, aur aap variables ke types ko change kar sakte hain bina error ke.
Data Types : Number > number String > string Boolean > boolean BigInt > bigInt Symbol > symbol null > object ☺☺☺☺☺☺☺ Non Primitive Data type (function, object, Array) > object
Javascript is dynamically typed language, which means the type of variable is determined by the value they hold at runtime and can be changed throughout the program as we assign different values to variable
Javascript is Dynamically typed because it can determine the type of value stored in variable at runtime, and the type of value stored in a variable can be changed later in the code. Hope that helps.
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.
JavaScript is a dynamic programming language. Dynamic Typing: Variables in JavaScript are not bound to a specific data type. You can assign a value of any type to a variable, and you can reassign a different type to the same variable without any issues.
Categorisation of data types is on the basis of, how the data is stored in memory and how it is accessed. Primitive is call by value, means if you assign one variable to another then you don't get the reference of data from memory, you get the copy of the value and if you make any changes in second variable it will not change anything in original data. Reference(Non-primitive) here you get the reference of the data from memory and thus refers to same data, if any changes made to data, it will reflect in all the variables referring to it.
JavaScript is a dynamically typed language Return type of variables in JavaScript Primitive Datatypes Number => number String => string Boolean => boolean null => object undefined => undefined Symbol => symbol BigInt => bigint Non-primitive Datatypes Arrays => object Function => function Object => object
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
String - string Number - number Boolean - boolean Null - object Undefined - undefined BigInt - bigint Symbol - symbol Array - object Function - function Object - object
JavaScript is a dynamically type language because in this language type of a variable is known at "runtime". So we don't need to specify type of varialbe when we declare it .
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
Primitive Data Types: String: Represents sequences of characters. Example: typeof "Hello" will return "string". Number: Represents both integer and floating-point numbers. Example: typeof 42 will return "number". Boolean: Represents true or false values. Example: typeof true will return "boolean". Null: Represents the absence of any value or object. Example: typeof null will return "object" (This is a quirk in JavaScript, but null is actually a primitive type). Undefined: Denotes an uninitialized variable. Example: typeof undefined will return "undefined". Symbol (Introduced in ES6): Represents a unique and immutable value. Example: typeof Symbol("description") will return "symbol". Reference (Non-Primitive) Data Types: Object: Represents a collection of key-value pairs (properties). Example: typeof { key: "value" } will return "object". Array: Represents a list-like collection of values. Example: typeof [1, 2, 3] will return "object". Function: Represents a reusable block of code. Example: typeof function() { return "Hello"; } will return "function". Date: Represents a specific point in time. Example: typeof new Date() will return "object". RegExp (Regular Expression): Represents a pattern used in string searching. Example: typeof /pattern/ will return "object". Custom Objects, Arrays, Functions, etc.: Any user-defined objects, arrays, or functions fall under this category. Example: typeof myObject will return "object"
There are two types of data types in jS 1- primitive data type & Return type Objects in js ------ 1) Number --> Number 2) String --> string 3) Boolean --> Boolean 4) Bigint --> Bigint 5) Null --> Object 6) undefine ---> undefine 7) Symbol --> Symbol 2- non primitive data types 1) Arrays --> Arrays 2) Objects --> Objects 3) Functions --> object Function
JavaScript is a Dynamically Typed Language. Because data types of the variable are determined by the value they hold at a runtime and it can be changed throughout the program. Primitive data types : String, Number, Boolean, null, undefined, Symbol, BigInt Reference type : Array, Object, Function
String = string number = number Boolean = boolean symbol = symbol bigInt = bigInt undefined = undefined null = object array = object function = function object = object
***Primitive DataTypes*** String = string Number = number Decimal = number Boolean = boolean null = object undefined = undefined Symbol = symbol BIGInt = bigInt ***Non-Primitive DataTypes*** Array = object Function = function (But say it function object) Object = object
JavaScript is a dynamically typed language means the type of data initializations is implicitly (automatic - self defined) based on its inbuild standards, Explicitly means we are defining the whole, implicitly means, javascript itself decides which type of data.
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.
Haan, JavaScript ek dynamic language hai. Iska matlab hai ki JavaScript mein variables ko define karte waqt unki data type ko specify nahi karna padta. Jab aap ek variable ko define karte hain, toh aap usme kisi bhi tarah ka data store kar sakte hain, aur aap baad mein uss variable mein different types ka data bhi store kar sakte hain. Yes, JavaScript is a dynamic language. This means that while defining variables in JavaScript, their data type does not have to be specified. Once you define a variable, you can store any type of data in it, and you can later store different types of data in that variable.
Javascript is dynamic Language and datatypes returned for 1. Primitive Datatypes: String = String Number = number Boolean = boolean Null = object Undefined = undefined Symbol = symbol bigInt = bigInt 2. Non-Primitve Function = function (obj function ) Array = object Object = object.
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
Tq
When you learn further prototype, function also acts as a object. Object is the parent one.
@@rupeshjadhav943 as sir said, it is basically object function
@ankita-vz4rb tum bohot mast kaam karta ha maksud bhai
thanks man :)
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.
nice gpt bhai
Python also
In javascript, the value have the type not the variable.
@@25Aadi25 at least he searched and comment it we must appreciate it
JavaScript is a dynamically typed language. Because data type will automatically assigned at the time of compilation or code execution.
yess just in time compilation language
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.
thanks dude
Thanks
Thanks buddy
thanks👍
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
Nice 👍
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❤❤
Sahi kaha bhai
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 ❤
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
Really sir this series is awesome from the courses thanks your explanation like this way admirable things that you are doing.
ab tak ka sabse shandar channel ,apka padhane ka tareeka real me best h bhaiya
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'
The Datatype of various values in Javascript are as follows:
*)Primitives;->
undefined->undefined.
null->object .
number->number.
Symbol->Symbol.
String->String.
BigInt->BigInt.
Boolean->boolean.
*)Non-Primitives->
Arrays->objects.
object->objects.
Funcitons->function or function objects.
Do give your suggestions on this if you find some difficulty or mistakes ..🙏🙏😉😉
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 👨💻
I'm still confused here that why JS doesn't throw us an error like variable not defined or not initialised
@@anuragsuryawanshi4177 because js is duck typed or loosely typed language
@@peacecode7 because bignumber was not defined
@@deepakshukla1810 it was defined, but when sir was commenting out console.logs , in order to provide a cleaner output, he mistakenly commented the declaration of bigNumber.
exactly @peacecode7
JavaScript ek "dynamically typed" language hai, yani ki isme variable ki data type runtime (execution time) par decide hoti hai, aur aap ek variable mein alag-alag data types ke values store kar sakte hain. JavaScript mein aap ek variable ko pehle number, phir string, aur phir boolean ke roop mein istemal kar sakte hain, aur interpreter runtime par type checks karta hai.
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.
Thank you for making such a beautiful javascript tutorial. Because You teach the actual javascript which is necessary for actual production development need. Very Very thank you. I will share your channel as much as possible to everyone. I really like your teaching style and I aslo need that type of javascript teacher. God bless you.
Type and typeof return value
number - number
string - String
boolean - boolean
symbol - symbol
bigint - bigint
undefined - undefined
null - object
array - object
object - object
function - function
but function is not only function it is object-function
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 .
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...
Once again your way of teaching extra ordinary sir .
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 + "!");
}
Such a great learning with a great teacher love you sir from Pakistan Multan ❤️❤️❤️
"Chai aur Code, you've made JavaScript feel like a breeze. Your passion for teaching shines through!"
At 13:57, You commented the variable declaration, that's why the typeof of BigInt value is showing 'undefined' because it couldn't find the variable. The actual typeof value of any BigInt variable is bigint and not undefined.
--> Primitive Datatypes (call by value)
1. Number -> number
2. String -> string
3. Undefined -> undefined
4. Null -> object
5. BigInt -> bigint
6. Boolean -> boolean
7. Symbol -> symbol
--> Non Primitive Datatypes (call by reference)
1. Object -> object
2. Array -> object
3. Function -> function
finally wait is end. Very helpful lecture, Hope content will continue. ☑☑☑☑
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.
Return types of variables in js:
Primitive datatypes:
Number =>number
String => string
Boolean => boolean
null => object
undefined => undefined
Symbol => symbol
BigInt => bigint
Reference (Non primitive data types):
Array => object
Object => object
Function => function
JavaScript is dynamically types language because data type will automatically assigned at the time of compilation or code execution.
TypeScript is statically typed language.
Really you made this interesting, I have completed JS course 3 times , 2 from UA-cam ane 1 is paid course, but still I am blank, but now I feel confident in JS, so thanks you
02:16 JavaScript data types can be categorized into primitive and non-primitive types.
04:32 Primitive data types in JavaScript
06:48 JavaScript data types
09:04 JavaScript data types include numbers, booleans, null, and undefined
11:20 Symbol and BigInt data types
13:36 Arrays and objects are non-primitive types in JavaScript
15:52 Using typeof function to find data types of variables
18:02 The return type for all non-primitive types is object function.
return type of variables in
JS
1- primitive:-
number => number
string => string
2- Non-primitive
Myobj => object
myfunction => function
bignumber => bigint or big number
it is an dynamically typed language because the value of the variables is checked at the run time and may change further according to needs
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.
Best JavaScript Course available on youtube❤
for typeof operator:for non primitive datatypes:
arr, object:object
and for function :object function
for primitive datatype:
Number => number
String => string
Boolean => boolean
null => object
undefined => undefined
Symbol => symbol
BigInt => bigint
02:16 JavaScript data types can be categorized into primitive and non-primitive types.
04:32 Primitive data types in JavaScript
06:48 JavaScript data types
09:04 JavaScript data types include numbers, booleans, null, and undefined
11:20 Symbol and BigInt data types
13:36 Arrays and objects are non-primitive types in JavaScript
15:52 Using typeof function to find data types of variables
18:02 The return type for all non-primitive types is object function.
02:16 JavaScript data types can be categorized into primitive and non-primitive types.
04:32 Primitive data types in JavaScript
06:48 JavaScript data types
09:04 JavaScript data types include numbers, booleans, null, and undefined
11:20 Symbol and BigInt data types
13:36 Arrays and objects are non-primitive types in JavaScript
15:52 Using typeof function to find data types of variables
18:02 The return type for all non-primitive types is object function.
Crafted by Merlin AI.
Javascript is dynamically typed language which means agar program me aage jakar variables ki value ka datatype change hota hai toh Javascript variables ke value ke current datatype ko hi valid manegi.
Jo mujhe samaj aaya vo kuch aisa tha.
string => datatype string
null => object
number => number
symbol => symbol
boolean => boolean
bigint=> bigint
undefined => undefined
// primitive datatypes
// 1. string
// 2. number
// 3. boolean
// 4. null
// 5. undefined
// 6. symbol
// 7. bigint
// non-primitive / Refference datatypes
// 1. arrays
// 2. objects
// 3. functions
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 so much sir for these amazing tutorials 🥰🙌
dynamically typed language
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
Dynamically Typed because the datatype needs not to be mentioned while initializing, also the datatype of variable is determined during the runtime
sir it is dynamic typed language because it assigned data type to a variable according to given value unlike typescript or c++ etc before declaring a variable we define its data type with a reserved word.
JavaScript is a dynamically typed language, which means that variables in JavaScript can hold values of any type, and the type of a variable can change at runtime. This flexibility allows for more fluid and adaptable programming, where you don't have to declare the type of a variable explicitly before using it.
"Hey Chai or Code and Hitesh Choudhary, I'm on the edge of my seat in anticipation for the backend full series and DSA series on this channel! ☕💻 Your content is like the perfect blend of coding wisdom and the soothing essence of chai, and I can't wait to dive deep into these topics with your expert guidance. Keep brewing up those fantastic tutorials, and I'll keep sipping and coding along! 🚀🔥"
Sir 6:35 Answer is Dynamically Type language ha kyuki sir hum runtime par variable ki value ko change kar sakte ha..And sir gazab videos ha Js ki.Thank you so much sir..
Hi Hitesh,
I noticed a small mistake in the video. You commented out the variable bigNumber, which caused it to show undefined when you checked the datatype. When you check the datatype of an undefined variable, it shows undefined. If you hadn't commented it out, you would have seen Bigint as the datatype for bigNumber.
Despite this minor error, I have to say I respect the effort you put into this course. I'm really enjoying it and appreciate the detailed explanations. Thank you for offering such a comprehensive JavaScript course for free!
JavaScript is a dynamically typed language. Because data type will automatically assigned at the time of compilation or code execution. TX sir....
Toh saral shabdon mein kaha jaye toh, JavaScript ek dynamically typed language hai, jahan variable types runtime par decide hote hain. Statically typed languages mein aapko variable types ko declare karna padta hai, aur ye types compile-time par check hote hain.
JavaScript is a dynamic language. This means that variables in JavaScript are not explicitly typed, and their types can change during the execution of a program. Additionally, JavaScript allows for features like dynamic typing, where variables can hold values of any type, and dynamic evaluation, where code can be constructed and executed at runtime.
return types :
*Primitive:
Number = number,
String = string,
Boolean = boolean,
Symbol = symbol,
bigint = bigint,
undefined = undefined,
null = object,
*Non Primitive:
Array = array(object),
function = function(object),
object = object.
all non primitives are objects. 💖
JavaScript dynamically typed language h jaha pe hamein koi variable declare karte samay uski type define nahin karni hotii. Wahi pe C, C++ aur Java jaise languages statically typed hote hai jahan hum koi variable declare karte samay uski data-type assign karte hai, (e.g. "int num = 10" , "bool isBlack = true" etc.)
Such a super premium value amazing sir 🙏 from mizoram india
JavaScript is a dynamically typed language.
In a dynamically typed language like JavaScript, variable types are determined at runtime, not at compile time. This means that you don't have to explicitly declare the data type of a variable when you create it, and you can change the type of a variable by assigning a value of a different type to it during the execution of the program.
best Series ALL OVER UNIVERSE, thank you Sir 🙏
--> Primitive Datatypes (call by value)
1. Number -> number
2. String -> string
3. Undefined -> undefined
4. Null -> object
5. BigInt -> bigint
6. Boolean -> boolean
7. Symbol -> symbol
--> Non Primitive Datatypes (call by reference)
1. Object -> object
2. Array -> object
3. Function -> function
Primitive Datatypes ka return type
String => String
Number => Number
Boolean => Boolean
Null => Object
Undefined => Undefined
Symbol => Symbol
BigInt => BigInt
Reference Datatypes ka return type
Array => Object
Object => Object
Function => Function
JavaScript is dynamically typed. This means that variable types are determined at runtime, rather than being explicitly declared in the code. In JavaScript, a variable can hold different types of values at different points in the program's execution. This dynamic typing allows for flexibility but also requires careful attention to data types to prevent unexpected behaviors.
Javascript is a dynamic typing language. When you declare a variable, you do not need to specify what type this variable is
JavaScript is a dynamically typed language, meaning variable types are determined at runtime rather than being explicitly declared. This allows variables to change types during execution, providing flexibility but potentially leading to runtime errors if not managed carefully.
You don’t have to declare a variable’s type when you create it. For example, you can assign a value to a variable without specifying whether it’s a number, string, or any other type
let myVariable = 10; // Initially a number
myVariable = "Hello"; // Now it's a string
In a statically typed language (like Java or TypeScript), you would need to declare the type of the variable explicitly, and it wouldn’t change during the program’s execution
int myVariable = 10; // Must always be an integer
1. Primitive Datatypes
number - number,
string - string ,
BigInt - BigInt,
undefined - undefined,
null - null ,
Symbol - Symbol,
boolean - boolean,
2. Non-Primitive Datatypes
Arrays - Object ,
Functions - function,
Object - object ( called Object function)
There are 2 data types in Js
1. Primitives
2. Reference (Non Primitives)
Primitives:
1. Number
Example: let number = 100
2. String
Example: let string = "Namaskar"
3. Boolean
Example: let isPurchased = false
4. Undefined
Example: let subscribe;
5. Null
Example: let like = null
6. Symbol
Example: const share = ("100")
7. BigInt
Example: const number = 100000000000n
Reference:
1. Arrays
Example: let objectArrays = [1,2,3]
2. Objects
Example: let video = {
subscribed: true,
like: true,
share: false
}
3. Function
Example: function sheryiansStudent() {
canMakeAwesomeWebs: true
}
JavaScript ek dynamically typed language hai, jisme variable ke types ko runtime par decide kiya jata hai, aur aap variables ke types ko change kar sakte hain bina error ke.
return type of variable in javascript
---primitive datatypes---
number =>number;
string => string;
null => object;
boolean => boolean;
bigInt => null;
undefined => undefined;
symbol => symbol;
---non primitive---
array => object;
function => function;
object =>object;
Data Types :
Number > number
String > string
Boolean > boolean
BigInt > bigInt
Symbol > symbol
null > object
☺☺☺☺☺☺☺
Non Primitive Data type (function, object, Array) > object
Javascript is dynamically typed language, which means the type of variable is determined by the value they hold at runtime and can be changed throughout the program as we assign different values to variable
Return Typeof Datatypes:
Primitive Datatypes:
string => string
number => number
Boolean => boolean
Null => object
undefined => undefined
symbol => symbol
bigInt => bigint
Non - Primitives :
Array => object
Object => object
Function => function
function ka datatype = function object h
6:35, JAVASCRIPT is a dynamically typed language as the types are defined at the runtime, and can be changed during execution.
Javascript is Dynamically typed because it can determine the type of value stored in variable at runtime, and the type of value stored in a variable can be changed later in the code. Hope that helps.
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.
#9 tutorial thanks for this tutorial 🙂
Big respect From Pune Maharashtra Histesh Sir👍🧿❤️👏
JS -Dynamically Typed, that helps in easy handling of data
JavaScript is a dynamic programming language.
Dynamic Typing: Variables in JavaScript are not bound to a specific data type. You can assign a value of any type to a variable, and you can reassign a different type to the same variable without any issues.
Categorisation of data types is on the basis of, how the data is stored in memory and how it is accessed.
Primitive is call by value, means if you assign one variable to another then you don't get the reference of data from memory, you get the copy of the value and if you make any changes in second variable it will not change anything in original data.
Reference(Non-primitive) here you get the reference of the data from memory and thus refers to same data, if any changes made to data, it will reflect in all the variables referring to it.
Thanks for the video Sir ❤
JavaScript is a dynamically typed language
Return type of variables in JavaScript
Primitive Datatypes
Number => number
String => string
Boolean => boolean
null => object
undefined => undefined
Symbol => symbol
BigInt => bigint
Non-primitive Datatypes
Arrays => object
Function => function
Object => object
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
best JS course ever ❤
String - string
Number - number
Boolean - boolean
Null - object
Undefined - undefined
BigInt - bigint
Symbol - symbol
Array - object
Function - function
Object - object
Very exllent level teaching
Best tutorial for JS
JavaScript is a dynamically type language because in this language type of a variable is known at "runtime". So we don't need to specify type of varialbe when we declare it .
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
Primitive Data Types:
String: Represents sequences of characters.
Example: typeof "Hello" will return "string".
Number: Represents both integer and floating-point numbers.
Example: typeof 42 will return "number".
Boolean: Represents true or false values.
Example: typeof true will return "boolean".
Null: Represents the absence of any value or object.
Example: typeof null will return "object" (This is a quirk in JavaScript, but null is actually a primitive type).
Undefined: Denotes an uninitialized variable.
Example: typeof undefined will return "undefined".
Symbol (Introduced in ES6): Represents a unique and immutable value.
Example: typeof Symbol("description") will return "symbol".
Reference (Non-Primitive) Data Types:
Object: Represents a collection of key-value pairs (properties).
Example: typeof { key: "value" } will return "object".
Array: Represents a list-like collection of values.
Example: typeof [1, 2, 3] will return "object".
Function: Represents a reusable block of code.
Example: typeof function() { return "Hello"; } will return "function".
Date: Represents a specific point in time.
Example: typeof new Date() will return "object".
RegExp (Regular Expression): Represents a pattern used in string searching.
Example: typeof /pattern/ will return "object".
Custom Objects, Arrays, Functions, etc.: Any user-defined objects, arrays, or functions fall under this category.
Example: typeof myObject will return "object"
There are two types of data types in jS
1- primitive data type &
Return type Objects in js ------
1) Number --> Number
2) String --> string
3) Boolean --> Boolean
4) Bigint --> Bigint
5) Null --> Object
6) undefine ---> undefine
7) Symbol --> Symbol
2- non primitive data types
1) Arrays --> Arrays
2) Objects --> Objects
3) Functions --> object Function
JavaScript is a Dynamically Typed Language. Because data types of the variable are determined by the value they hold at a runtime and it can be changed throughout the program.
Primitive data types : String, Number, Boolean, null, undefined, Symbol, BigInt
Reference type : Array, Object, Function
String = string
number = number
Boolean = boolean
symbol = symbol
bigInt = bigInt
undefined = undefined
null = object
array = object
function = function
object = object
***Primitive DataTypes***
String = string
Number = number
Decimal = number
Boolean = boolean
null = object
undefined = undefined
Symbol = symbol
BIGInt = bigInt
***Non-Primitive DataTypes***
Array = object
Function = function (But say it function object)
Object = object
null ka object aye ga ,function ka function aye ga ,string ka string,number ka number,undefined ka undefined aye ga
DataType has 2 types
1. primitive datatype
2. reference datatype
1. Primitive datatype
number = Number
string = String
boolean = Boolean
null = Object
undefined = undefined
bigint = BigInt
Symbol = Symbol
2. reference type
Arrays = Object
Function = Function
object = Object
JavaScript is a dynamically typed language means the type of data initializations is implicitly (automatic - self defined) based on its inbuild standards, Explicitly means we are defining the whole, implicitly means, javascript itself decides which type of data.
Sir, at 14:08 you comment out bigInt, line no.17 thats why the result of typeof bigNumber came undefined.
JavaScript is a dynamic language and not static, which means that variables can hold values of different types during runtime.
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.
I Salute Hitesh sir
Haan, JavaScript ek dynamic language hai. Iska matlab hai ki JavaScript mein variables ko define karte waqt unki data type ko specify nahi karna padta. Jab aap ek variable ko define karte hain, toh aap usme kisi bhi tarah ka data store kar sakte hain, aur aap baad mein uss variable mein different types ka data bhi store kar sakte hain.
Yes, JavaScript is a dynamic language. This means that while defining variables in JavaScript, their data type does not have to be specified. Once you define a variable, you can store any type of data in it, and you can later store different types of data in that variable.
typeof 6 => number
typeof "6" => string
typeof 6n => undefined
typeof true => Boolean
typeof [6] => array
typeof {num:6} => object
typeof function (){} => function
typeof null => object
typeof undefined => undefined
Javascript is dynamic Language and datatypes returned for
1. Primitive Datatypes:
String = String
Number = number
Boolean = boolean
Null = object
Undefined = undefined
Symbol = symbol
bigInt = bigInt
2. Non-Primitve
Function = function (obj function )
Array = object
Object = object.