1 00:00:14,100 --> 00:00:19,950 Hello and welcome to the goal and programming language course in the previous session, we talked about 2 00:00:19,950 --> 00:00:26,490 creating and initializing a map variation by the make function and indecision decision. 3 00:00:26,520 --> 00:00:29,220 We want to talk about the other maps concept. 4 00:00:34,670 --> 00:00:43,550 Map links to determine how many items key value pairs a map has use built in land function. 5 00:00:44,510 --> 00:00:51,770 Now you can see the sample go to this school to illustrate how to use built in land function. 6 00:00:53,820 --> 00:01:00,750 For the example, creating a map using make function twist or employees marks and sit astride times 7 00:01:00,750 --> 00:01:15,390 as index and sit in type as value, vash and fluid equals make function math. 8 00:01:16,620 --> 00:01:23,460 This global markets sit history as index and sit end as value. 9 00:01:24,000 --> 00:01:37,770 Now go to the next line and initialize the Mac and Louis index, for example, keen and value is 10. 10 00:01:39,060 --> 00:01:48,930 Go to the next line, and Louis, he is gene values 20. 11 00:01:49,500 --> 00:01:53,820 And in the next line and another element employee. 12 00:01:57,630 --> 00:01:58,200 Rather. 13 00:02:00,670 --> 00:02:02,710 And value is 30. 14 00:02:04,210 --> 00:02:07,090 And create a game empty map. 15 00:02:08,110 --> 00:02:12,610 Go to the next line and Chloe 16 00:02:14,920 --> 00:02:15,600 Beast. 17 00:02:17,380 --> 00:02:34,870 Colin Equals make and map key is strange, and when is it now, Yvonne, to see length of to my variable 18 00:02:34,900 --> 00:02:42,220 by the land function, first variable initialize and second variable don't initialize. 19 00:02:42,550 --> 00:02:59,920 Go to the next line FP lend function for the employee and go to the next line if the using land function 20 00:03:00,460 --> 00:03:01,840 for the employee list. 21 00:03:05,030 --> 00:03:09,710 Reformat the code, save the project and execute the program. 22 00:03:12,140 --> 00:03:20,630 Now we can see the output for employment, the length is three because it has three values and for the 23 00:03:20,630 --> 00:03:27,740 employee list, the length is zero because it doesn't have any value and the learned function in return 24 00:03:27,860 --> 00:03:30,710 zero for an undisclosed month. 25 00:03:32,330 --> 00:03:34,910 Now go to his line and continue. 26 00:03:37,140 --> 00:03:46,500 Accessing items, you can access the items of a map by referring to its key name inside Esquire brackets. 27 00:03:47,770 --> 00:03:49,630 Now you can see the sandpit. 28 00:03:51,160 --> 00:03:55,420 Go to this school to illustrate how to access map items. 29 00:03:57,220 --> 00:03:58,990 First, clear the last quote. 30 00:04:05,010 --> 00:04:13,050 Save the project, for the example, creating a map twist to a person's idea and sit and type as index 31 00:04:13,050 --> 00:04:30,660 and string type as a value vase in pillowy equals map type index is in and value index is a string and 32 00:04:30,660 --> 00:04:32,100 initialize the variable. 33 00:04:33,330 --> 00:04:36,930 For the example, a hundred other 34 00:04:39,450 --> 00:04:47,970 key and 200 dollar value is gene. 35 00:04:49,330 --> 00:05:02,410 And third element 300, Colin, and value is rather diplomatic coup and go to the next line. 36 00:05:02,920 --> 00:05:08,230 Now you access the map items by calling in the Esquire brackets. 37 00:05:09,100 --> 00:05:12,550 So do the following if he 38 00:05:16,150 --> 00:05:25,000 said name of map and put the selected index in square brackets for the example employee escort brackets 39 00:05:25,000 --> 00:05:33,070 and set the index for the Example 100, reformat the code and save the project, then execute the program. 40 00:05:35,530 --> 00:05:37,180 Now we can see the output. 41 00:05:37,510 --> 00:05:42,010 We put an index in square brackets and get the value of that index. 42 00:05:42,430 --> 00:05:47,710 In this case, we set the hundred as index and the return chain as value. 43 00:05:48,370 --> 00:05:55,990 Now we could define the map and access to its items in order not to prolong the time of decision will 44 00:05:55,990 --> 00:06:00,160 finish it, and we will continue the content in the next session. 45 00:06:00,520 --> 00:06:01,150 Goodbye.