ECMAScript 2015 ã§å¤ã¨å¤ã¨ããããã³ã°ããæ°ãããã¼ã¿æ§é ãå°å ¥ããã¾ãããMap ãªãã¸ã§ã¯ãã¯ã·ã³ãã«ãªãã¼ / ããªã¥ã¼ãããã§ãæ¿å ¥é ã«è¦ç´ ãå復å¦çãããã¨ãã§ãã¾ãã 次ã®ã³ã¼ãã§ã¯ Map ãç¨ããããã¤ãã®åºæ¬çãªæä½ã表ãã¦ãã¾ããã¾ãã追å ã®ä¾ãå ¨ã¦ã® API ã«ã¤ãã¦ã¯ãMap ãªãã¡ã¬ã³ã¹ãã¼ã¸ãã覧ãã ãããfor...of ã«ã¼ãã使ã£ã¦ãåå復å¦çã«ãã㦠[key, value] ãããªãé åãè¿ãã¦ãã¾ãã let sayings = new Map(); sayings.set("dog", "woof"); sayings.set("cat", "meow"); sayings.set("elephant", "toot"); sayings.size; // 3 sayings.get("dog"); // woof sayings.
{{#tags}}- {{label}}
{{/tags}}