1 00:00:00,340 --> 00:00:02,340 Hello friends, nice to see you back. 2 00:00:02,350 --> 00:00:05,350 In this tutorial we are going to learn about symbol. 3 00:00:05,380 --> 00:00:08,350 We already know about data type in JavaScript. 4 00:00:08,360 --> 00:00:16,270 Specially we have seven type of data type string, number, boolean, array, object, null and undefined. 5 00:00:16,270 --> 00:00:21,190 But a new data type has been added to this list which is symbol. 6 00:00:21,190 --> 00:00:23,890 And in this video we are going to learn about symbol. 7 00:00:24,040 --> 00:00:29,170 But before we learn about symbol, let's take a overview to our old data types. 8 00:00:29,350 --> 00:00:35,740 Suppose I have a variable name a and if we assign this variable and insert the double quotes or single 9 00:00:35,740 --> 00:00:40,960 quotes, if I provide any value, then we call it a string and it doesn't matter. 10 00:00:40,960 --> 00:00:42,970 Is it alphabetic or numeric? 11 00:00:43,000 --> 00:00:43,790 It's mean. 12 00:00:43,840 --> 00:00:45,490 A data type is string. 13 00:00:45,520 --> 00:00:52,090 Similarly, if we assign a numeric value without quotes, then we call it number data type. 14 00:00:52,240 --> 00:00:56,710 But if I provide true or false without quotation, it's mean. 15 00:00:56,710 --> 00:00:58,180 It's a boolean data type. 16 00:00:58,180 --> 00:01:03,880 But if I add multiple value in our A variable, then we can use array data type. 17 00:01:03,880 --> 00:01:06,310 For this we need to use square braces. 18 00:01:06,310 --> 00:01:08,110 And then we can use multiple value. 19 00:01:08,110 --> 00:01:13,240 But if I want to add key and value pair then we can use object data type. 20 00:01:13,330 --> 00:01:18,430 And if I assign null to this variable then we call it null data type. 21 00:01:18,430 --> 00:01:24,360 And if we do not define any value to this variable in that case we can call it undefined. 22 00:01:24,370 --> 00:01:30,070 I know if you are in this course, you already know about it, just want to revise once again. 23 00:01:30,070 --> 00:01:34,120 But in this video we are going to understand a new data type symbol. 24 00:01:34,120 --> 00:01:39,520 When you want to use symbol data type, you need to take variable and you need to assign with a symbol 25 00:01:39,520 --> 00:01:40,120 method. 26 00:01:40,120 --> 00:01:44,110 And remember this should be capital and we need to use round basis. 27 00:01:44,110 --> 00:01:47,980 After that and insert this symbol we can place any value. 28 00:01:48,010 --> 00:01:51,790 It may be numeric value or string value something like that. 29 00:01:51,790 --> 00:01:55,960 And we call this string symbol identifier or description. 30 00:01:55,960 --> 00:01:58,060 And it's always a unique value. 31 00:01:58,060 --> 00:02:02,440 I want to say we cannot assign the same value to other symbol. 32 00:02:02,470 --> 00:02:06,880 Suppose I take another variable b and I'm going to provide the same value. 33 00:02:06,910 --> 00:02:10,690 As you can see, a and b variable value is same. 34 00:02:10,870 --> 00:02:13,540 Maybe you can think their value is same. 35 00:02:13,540 --> 00:02:16,480 So if we try to compare them it returned true. 36 00:02:16,480 --> 00:02:18,370 But this is not going to happen. 37 00:02:18,370 --> 00:02:21,340 If we compare this to variable its return false. 38 00:02:21,340 --> 00:02:28,150 Their value looks same, but they are not same because symbols values are unique and if we try to compare 39 00:02:28,150 --> 00:02:32,710 it, it returns false when we need to use unique value to our program. 40 00:02:32,710 --> 00:02:35,440 In that case, we can use symbols. 41 00:02:35,440 --> 00:02:39,820 So let's start the practical and try to explore more about symbols.