{"id":2456,"date":"2022-07-24T19:56:24","date_gmt":"2022-07-24T19:56:24","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=2456"},"modified":"2022-07-24T19:56:25","modified_gmt":"2022-07-24T19:56:25","slug":"javascript-map-values","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/javascript-map-values\/","title":{"rendered":"JavaScript Map values() Method"},"content":{"rendered":"<p><strong>Getting a new iterator object containing values from the Map(values method)<\/strong><\/p>\n<p>Now, we are going to have a look at a method, with which, we can get an iterator object, which contains the values for each element in the map object in the insertion order. The method that we are going to have a look at right now, is the values() method. Have a look at the below program, where we are trying to get the values for each element in the map.<\/p>\n<h2 style=\"text-align: center;\">JavaScript Map values() Method<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1790 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method.jpg\" alt=\"\" width=\"1317\" height=\"297\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method.jpg 1317w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-300x68.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1024x231.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-768x173.jpg 768w\" sizes=\"auto, (max-width: 1317px) 100vw, 1317px\" \/><\/p>\n<p>If we try to have a look at the output, this is what we are going to get &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1791 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1.jpg\" alt=\"\" width=\"1600\" height=\"593\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1.jpg 1600w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1-300x111.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1-1024x380.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1-768x285.jpg 768w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Getting-a-new-iterator-object-containing-values-from-the-Mapvalues-method-1-1536x569.jpg 1536w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p>As you can see, we are getting an iterable object, containing the values from the Map.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting a new iterator object containing values from the Map(values method) Now, we are going to have a look at a method, with which, we can get an iterator object, which contains the values for each element in the map object in the insertion order. The method that we are going to have a look [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[14,15],"class_list":{"0":"post-2456","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-javascript-tutorial","7":"tag-javascript","8":"tag-javascript-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/2456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=2456"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/2456\/revisions"}],"predecessor-version":[{"id":2503,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/2456\/revisions\/2503"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=2456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=2456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=2456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}