{"id":28594,"date":"2021-03-25T19:47:09","date_gmt":"2021-03-25T14:17:09","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/"},"modified":"2024-09-03T11:20:55","modified_gmt":"2024-09-03T05:50:55","slug":"datatypes-in-javascript","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/","title":{"rendered":"JavaScript Data Types"},"content":{"rendered":"\n<p>What are Data types?<\/p>\n\n\n\n<p>Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.<\/p>\n\n\n\n<p>The five most basic types of data are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Strings&nbsp;<\/li>\n\n\n\n<li>Numbers&nbsp;<\/li>\n\n\n\n<li>Booleans&nbsp;<\/li>\n\n\n\n<li>Undefined<\/li>\n\n\n\n<li>Null<\/li>\n<\/ul>\n\n\n\n<p>These are referred to as primitive data types. A single variable can store a single type of data. That means it is important for us to learn to store our data correctly. The computer will identify what type of data we\u2019re working with based on the syntax or the way you write the code. It\u2019s important to remember and practice these differences; otherwise, data could be stored in an improper format and stir some trouble for us later.<\/p>\n\n\n\n<p>Let\u2019s go through a brief overview of each type of data and what it can be used for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Strings are collections of alphanumeric characters and symbols. We\u2019ll be using them to store letters and words, things like addresses.<br><\/li>\n\n\n\n<li>&nbsp;Numbers are exactly what you\u2019d expect \u2013 they\u2019re essentially numbers, including integers and decimals. Computers often use numbers to perform mathematical operations, but they may also just store a numeric value, like a count of how many types of pizza a store sells.<br><\/li>\n\n\n\n<li>&nbsp;Booleans can only have two values \u2013 True and False. They represent all data that has only two states. E.g., a light switch, which can either be on or off.<br><\/li>\n\n\n\n<li>The Undefined data type means that the variable has been created but has never been given a value. It is nothing because no one ever bothered to tell it what value it should be.<br><\/li>\n\n\n\n<li>Null is similar to Undefined, except it has to be set <strong>intentionally. <\/strong>It also means empty or nothing, but it\u2019s that way because the developer set it to be either open or nothing.<br><\/li>\n\n\n\n<li>We will also look at two more data types, objects, and arrays. Objects and arrays are collections, a way to group multiple data points into a single bundle that we can pass around, use and access.<\/li>\n<\/ul>\n\n\n\n<p>These are only some of the data types that you will be using. We\u2019ll review exactly how to write the syntax for each data type, as well as why you might want to use one over another.<\/p>\n\n\n\n<p>We need to keep in mind that the computer thinks about data and information differently. It\u2019s got different buckets for the different types. So, we need to learn those types and use the right ones in the right scenarios.<\/p>\n\n\n\n<p>Some of the most simple and common JavaScript data types that we\u2019re going to encounter are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>String, e.g. \"to be or not to be\"<\/li>\n\n\n\n<li>Number, e.g. 123&nbsp;<\/li>\n\n\n\n<li>Boolean, e.g. true&nbsp;<\/li>\n\n\n\n<li>Null, eg.&nbsp; var temp = null;<\/li>\n\n\n\n<li>Undefined, e.g. var rhyme;&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Also Read: <a href=\"https:\/\/www.mygreatlearning.com\/blog\/javascript-tutorial\/\">JavaScript Tutorial<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Strings<\/li>\n<\/ol>\n\n\n\n<p>You could start a string using double quotes, single quotes, or the backtick character.<\/p>\n\n\n\n<p>Double quotes: \"string\"<br>Single quotes: 'string'<br>Backtick character: `string`<\/p>\n\n\n\n<p>Double quote and single quote strings behave in the same manner, and the backtick character comes with some extra functionality.&nbsp;<\/p>\n\n\n\n<p>Sticking to the basics, we\u2019ve got a double-quoted string between which we can put in any value, such as:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\"The cat went to 7-11\"<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>You would notice that the color remains uniform within the quotation marks. If this were copied and placed outside the quote marks, the color in the editor would change to something different: <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>The cat went to 7-11<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>That\u2019s because the default white color in the current scheme is trying to look for a variable with a name matching that in the above sentence; however, it is unable to find it. Instead, it is trying to perform a mathematical function like 7-11.&nbsp; To wrap a value as a string, we can place any valid alphanumeric characters in between our double quotes, single quotes, or backticks. One of the great features of the backtick character is that it can accommodate long string characters that stretch onto a new line as well. So it allows us to split a string into multiple lines of code.<\/p>\n\n\n\n<p>Although most developers would use a backtick character tick to represent a string, you may still find double quotes and single quotes to represent strings in classes and tutorials. Alphanumeric characters - letters, numbers, and special symbols are an important part of human communication to write sentences or type messages. We need a way to store that information so it remains intact the way the user gave it to us, and that\u2019s where strings come into play.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/&nbsp; INTRODUCTION TO STRINGS IN JAVASCRIPT<br><br>\/\/ DOUBLE AND SINGLE QUOTE STRINGS<br>var str = \"double quote string\";<br>var str2 = 'single quote string';<br><br>\/\/ STRINGS WITH BACKTICKS<br>var str3 = \"Hello\";<br>var greet = `${str3}, World`;&nbsp; \/\/ strings enclosed in backticks can also allow us call other variables or write expressions<br>console.log(greet);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ this will log \"Hello, World\" to the console.<br>console.log(`sum of 1 and 2 is ${1 + 2}`); \/\/ this will log \"sum of 1 and 2 is 3\" to the console<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>Hello, World<\/p>\n\n\n\n<p>The sum of 1 and 2 is 3<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Numbers<\/li>\n<\/ol>\n\n\n\n<p>Numbers are as straightforward as they sound. They can be integer or decimal values that do not allow any letters or special characters. They usually store values for the same kinds of things that we use the money for in real life, such as money, age, etc. Besides regular numbers, there are special numeric types \u2014&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>NaN (Not a Number) represents an invalid or undefined mathematical operation.<\/li>\n\n\n\n<li>-Infinity and Infinity represent the mathematical value infinity.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>var x = 5;<br>var y = 10;<br>console.log(typeof x);&nbsp; \/\/ will log out 'number' to the console<br><br>\/\/ BASIC OPERATIONS ON NUMBERS<br>console.log(x + y); &nbsp; \/\/ will add x and y and log out \"15\"<br>console.log(x - y); &nbsp; \/\/ will subtract x and y and log out \"-5\" to the console<br>console.log(x * y); &nbsp; \/\/ will multiply x and y and log out \"50\" to the console<br>console.log(y \/ x); &nbsp; \/\/ will divide y from x and log out \"2\" to the console<br>console.log(y % 2); &nbsp; \/\/ will give remainder of y divided by 2 and log out \"0\" to the console<br><br>\/\/ OPERATIONS WITH FLOATING POINTS<br>var pi = 3.14;<br>var radius = 20;<br>var area = pi * (radius**2);<br>console.log(area);&nbsp; &nbsp; \/\/ wil give the area for the circle<br><br>\/\/ COMPARISON OPERATIONS ON NUMBERS<br>console.log(x &lt; y);&nbsp; &nbsp; \/\/ true<br>console.log(x &gt; y);&nbsp; &nbsp; \/\/ false<br>console.log(x == y); &nbsp; \/\/ false<br>console.log(x != y); &nbsp; \/\/ true<br>console.log(5 == 5); &nbsp; \/\/ true<br><br>\/\/ INCREMENT AND DECREMENT OPERATIONS<br>var i = 4;<br>i++<br>console.log(i);&nbsp; &nbsp; &nbsp; &nbsp; \/\/ 5<br>i--<br>console.log(i); &nbsp; &nbsp; &nbsp; \/\/ 3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>number<br>15<br>-5<br>50<br>2<br>0<br>1256<br>true<br>false<br>false<br>true<br>true<br>5<br>4<\/p>\n\n\n\n<p>The JavaScript <em>number<\/em> type does not include numbers greater than (<strong>2^53)-1<\/strong> or smaller than -(<strong>2^53)-1<\/strong>. Therefore, the <em>bigint <\/em>type can store and safely operate on large integers. A <em>bigint<\/em> is created by appending the n character at the end of a number.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO BIGINT IN JAVASCRIPT<br><br>\/\/ to get the maximum and minimum values of infinity<br>console.log(Number.MAX_VALUE);<br>console.log(Number.MAX_SAFE_INTEGER)<br>console.log(Number.MIN_VALUE);<br>console.log(Number.MIN_SAFE_INTEGER);<br>console.log(500n + 10n);&nbsp; &nbsp; &nbsp; \/\/ 510n<br>console.log(1000n ** 1000n);&nbsp; &nbsp; \/\/ try doing this in the console<br>console.log(500n + 1);&nbsp; &nbsp; &nbsp; &nbsp; \/\/ TypeError :&nbsp; it is not allowed to mix BigInt and other types, try using explicit conversions instead<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>1.7976931348623157e+308<\/p>\n\n\n\n<p>9007199254740991<\/p>\n\n\n\n<p>5e-324<\/p>\n\n\n\n<p>-9007199254740991<\/p>\n\n\n\n<p>510<\/p>\n\n\n\n<p>10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<\/p>\n\n\n\n<p>error: Uncaught TypeError: Cannot mix BigInt and other types, use explicit conversions<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Booleans<\/li>\n<\/ol>\n\n\n\n<p>Booleans or bool datatypes can only store two values- true or false.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO BOOLEAN IN JAVASCRIPT<br><br>\/\/ a boolean value only can only have two states - either \"true\" or \"false\".<br>\/\/ booleans are used in logical operations where \"true\" represents \"1\" and \"false\" represents \"0\"<br><br>\/\/ USING BOOLEANS WITH CONDITIONALS<br><br>\/\/ booleans form a basis for conditionals; if true then perform some task, else do something else.<br>var isLoggedIn = false;<br>if(isLoggedIn){<br>&nbsp; console.log(\"Logged in!\");<br>} else {<br>&nbsp; console.log(\"Currently you are not logged in. Please log in\");<br>}<br>\/\/ since \"isLoggedIn\" is assigned a \"false\" value, the code within the else block is executed.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>Currently you are not logged in. Please log in<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Null<\/li>\n<\/ol>\n\n\n\n<p>Null values are empty, i.e. they have no value assigned to them. The difference between null and undefined datatypes is that undefined exists when we have not provided a value.<\/p>\n\n\n\n<p>Var rhyme = `roses are red and violets are blue`<\/p>\n\n\n\n<p>rhyme= null<\/p>\n\n\n\n<p>So if a developer decides that they want the rhyme variable gone, they can set it to null. This is done on purpose using variable assignment.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO NULL IN JAVASCRIPT<br><br>var yourAge = null;&nbsp; &nbsp; \/\/ yourAge exists now, but it's value is \"none\" or \"empty\"<br>console.log(yourAge);&nbsp; \/\/ will give \"null\" to the console<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p><strong>null<\/strong><\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Undefined<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>var rhyme;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The variable rhyme currently has an undefined value. So rhyme was created, memory storage was allocated to remember data, but because no value was put in there, it is undefined.<\/p>\n\n\n\n<p>So if a value was never provided to a variable, it is undefined. In javaScript\u2019s default behaviour, everything is undefined until it has been assigned a value.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO UNDEFINED IN JAVASCRIPT<br><br>\/\/ let's try to access a variable \"yourAge\" in the console that has never been initialized<br>console.log(yourAge);&nbsp; \/\/ will give ReferenceError : yourAge is not defined<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>error: Uncaught ReferenceError: yourAge is not defined<\/p>\n\n\n\n<p>Some of the most common composite datatypes we will encounter are:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Array, eg. true&nbsp;<\/li>\n\n\n\n<li>Object, eg. {name: 'Ananya', age: 22, gender: 'female'}<\/li>\n\n\n\n<li>Function, eg.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>var welcome = function() {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return \"hello\";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li>&nbsp;Arrays<\/li>\n<\/ol>\n\n\n\n<p>An array datatype expresses lists; like a list of followers on Instagram or a list of apartments on Oyo. Lists have their own datatypes in all programming languages. In JavaScript, its datatype is an array. For example, a list of friend\u2019s names will look like this:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>[\"Friend1\", \"Friend2\", \"Friend3\"]<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Note the syntax of the array; it is enclosed in square brackets. This is how JavaScript interprets that it is dealing with an array. You could also have a list for Amazon ratings, for example. This would be an array with numbers.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>[4, 4.6, 3.2, 5]<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>As you can see, array is a list that contains other datatypes just as we have created an array with strings and numbers. You can also mix different datatypes inside a single array, just as we have both integers and decimals in one array. You can also write an array with string, integer and boolean expressions, like this:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO ARRAYS IN JAVASCRIPT[\"some text\", 5, true]<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Objects&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>Objects are used to store various collections of data using \u201ckey-value\u201d pairs.&nbsp;<\/p>\n\n\n\n<p>For eg, {name: 'Adam', age: 21, gender: 'male'}<\/p>\n\n\n\n<p>It is important to note the syntax here so JavaScript understands what datatype is being used. An array is expressed using square brackets and objects are expressed using curly brackets.&nbsp;<\/p>\n\n\n\n<p>Another example of an object could be an apartment complex at an Oyo. It would include information such as the address, price, rating, availability, images, etc. For eg:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>{<br>location: \"address 12\/34\",<br>price: \"5000\",<br>rating: \"5\",<br>description: \"some text\",<br>availability: true,<br>images: [\"img1Link\", \"img2Link\", \"img3Link\"]<br>}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The syntax highlighting also helps us to see that strings, numbers and booleans are coloured differently, meaning that JavaScript understands the difference between them. This is how an object uses key value pairs where the key describes what the value stands for and is completely user-defined. Any datatype can be used as a value inside the object. So in this example we have stored string, integer, boolean and array values. It is also possible to store an object inside another object. These would classify as complex data structures for eg:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>{<br>{authorName: \"user12\", rating: 5, explanation: \"great product\"},<br>{authorName: \"user34\", rating: 4.5, explanation: \"it's alright\"},<br>{authorName: \"user56\", rating: 4, explanation: \"nothing special\"}<br>}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Objects can be used to group information into one item, like an array.&nbsp; Symbols can be used to create unique identifiers for object datatypes. Symbols are unique and immutable data types. They are used as unique property keys since a symbol does not clash with any other property (either symbols or strings).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO OBJECTS IN JAVASCRIPT<br><br>var person = { &nbsp; &nbsp; \/\/ creating an object \"person\"<br>&nbsp; name : \"John Doe\",<br>&nbsp; age :&nbsp; 21,<br>&nbsp; gender: \"male\"<br>};&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ the object contains a collection of keys-value pairs with values of different types<br><br><br>\/\/ INTRODUCTION TO SYMBOLS<br><br>let sym1 = Symbol();<br>let sym2 = Symbol(\"sym2\"); &nbsp; \/\/ the only purpose of providing a string value inside Symbol() is to identify the symbol<br><br>\/\/ SYMBOLS ARE UNIQUE<br><br>console.log(sym1 === sym2);&nbsp; \/\/ false<br><br>let sym3 = Symbol(\"sym2\");<br>console.log(sym2 === sym3);&nbsp; \/\/ false<br>\/\/ symbols are always unique they never equal each other no matter what<br><br>console.log(typeof sym1) &nbsp; &nbsp; \/\/ 'symbol'<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>false<br>false<br>symbol<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Function<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/introduction-to-javascript\">JavaScript<\/a> allows functions to act as a data type that can be assigned to a variable. For eg, we have created an object called a dog with string, number, and function values for name, age, and bark respectively. The function property performs a specific task, which in this case is for the dog to bark.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO FUNCTIONS IN JAVASCRIPTvar dog = {<br>name: \"Buddy\",<br>age: 4,<br>bark: function(sound)&nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; console.log(sound || \"Woof Woof\")<br>}<br>}<br>dog.bark() \/\/ calling the function bark in the console will return \u201cWolf Wolf\u201d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>Woof Woof<\/p>\n\n\n\n<p>The purpose of function as a datatype in JavaScript is to organize our&nbsp; program into small, executable pieces of code that can be called as needed to do a specific action. These actions can either return a result or complete the task and end execution.<\/p>\n\n\n\n<p>Typeof<\/p>\n\n\n\n<p>While JavaScript is able to interpret what type of data is present inside a variable based on the syntax, we as users may not always be able to interpret data inside a variable simply by looking inside the browser. So if we want to know what type of data is stored inside the variable, we can use an operator called typeof. It can be used with or without brackets (typeof(x) or typeof x).<\/p>\n\n\n\n<p>For eg,<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ INTRODUCTION TO TYPEOF IN JAVASCRIPT\/\/ Numbers<br>console.log(typeof 96.6);&nbsp; \/\/ Returns: \"number\";<br>\/\/ Strings<br>console.log(typeof 'to be or not to be');&nbsp; \/\/ Returns: \"string\"<br>\/\/ Booleans<br>console.log(typeof false); \/\/ Returns: \"boolean\"<br>\/\/ Null<br>console.log(typeof Null);&nbsp; \/\/ Returns: \"object\"<br>\/\/ Objects<br>console.log(typeof {name: \"Ananya\", age: 22});&nbsp; \/\/ Returns: \"object\"<br>\/\/ Arrays<br>console.log(typeof [4, 4.5, 5]);&nbsp; \/\/ Returns: \"object\"<br>var bool1= true;<br>console.log(typeof bool1); \/\/ this will return boolean in the console<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CONSOLE:<\/p>\n\n\n\n<p>number<br>string<br>boolean<br>undefined<br>object<br>object<br>boolean<\/p>\n\n\n\n<p>Interested in exploring more about Java? Check out <a href=\"https:\/\/www.mygreatlearning.com\/blog\/javascript-projects\/\" target=\"_blank\" rel=\"noreferrer noopener\">Javascript Projects<\/a> to learn more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What are Data types? Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables. The five most basic types of data are: These are referred to as primitive data types. A single variable can store a single type of data. That means it is important [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":28596,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[],"content_type":[],"class_list":["post-28594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JavaScript Data Types<\/title>\n<meta name=\"description\" content=\"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Data Types\" \/>\n<meta property=\"og:description\" content=\"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-25T14:17:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-03T05:50:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"457\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"JavaScript Data Types\",\"datePublished\":\"2021-03-25T14:17:09+00:00\",\"dateModified\":\"2024-09-03T05:50:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/\"},\"wordCount\":2417,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Javascript.jpeg\",\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/\",\"name\":\"JavaScript Data Types\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Javascript.jpeg\",\"datePublished\":\"2021-03-25T14:17:09+00:00\",\"dateModified\":\"2024-09-03T05:50:55+00:00\",\"description\":\"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Javascript.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Javascript.jpeg\",\"width\":800,\"height\":457},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/datatypes-in-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\\\/Software Development\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Data Types\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JavaScript Data Types","description":"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Data Types","og_description":"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2021-03-25T14:17:09+00:00","article_modified_time":"2024-09-03T05:50:55+00:00","og_image":[{"width":800,"height":457,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"JavaScript Data Types","datePublished":"2021-03-25T14:17:09+00:00","dateModified":"2024-09-03T05:50:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/"},"wordCount":2417,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg","articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/","url":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/","name":"JavaScript Data Types","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg","datePublished":"2021-03-25T14:17:09+00:00","dateModified":"2024-09-03T05:50:55+00:00","description":"Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg","width":800,"height":457},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/datatypes-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"JavaScript Data Types"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg",800,457,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-150x150.jpeg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-300x171.jpeg",300,171,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-768x439.jpeg",768,439,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg",800,457,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg",800,457,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript.jpeg",800,457,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-640x457.jpeg",640,457,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-96x96.jpeg",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/Javascript-150x86.jpeg",150,86,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"What are Data types? Data types describe the types or kinds of data \u2013 and their attributes \u2013 that can be stored in variables. The five most basic types of data are: These are referred to as primitive data types. A single variable can store a single type of data. That means it is important&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/28594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=28594"}],"version-history":[{"count":6,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/28594\/revisions"}],"predecessor-version":[{"id":109841,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/28594\/revisions\/109841"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/28596"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=28594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=28594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=28594"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=28594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}