From caaa416be01fea49e0cd73993c61412debe00485 Mon Sep 17 00:00:00 2001 From: Tim Eggers <65358490+freeZe2511@users.noreply.github.com> Date: Tue, 22 Mar 2022 20:07:30 +0100 Subject: [PATCH] fix(curriculum): fix method listings to improve readability of description (#45483) * fix method listings * fix lint --- .../data-structures/create-an-es6-javascript-map.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/10-coding-interview-prep/data-structures/create-an-es6-javascript-map.md b/curriculum/challenges/english/10-coding-interview-prep/data-structures/create-an-es6-javascript-map.md index 8fa949146ef..8e895d9b218 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/data-structures/create-an-es6-javascript-map.md +++ b/curriculum/challenges/english/10-coding-interview-prep/data-structures/create-an-es6-javascript-map.md @@ -8,7 +8,15 @@ dashedName: create-an-es6-javascript-map # --description-- -The new version of JavaScript provides us with a built-in Map object which provides much of the functionality we wrote by hand in the last challenge. This Map object, although similar to regular JavaScript objects, provides some useful functionality that normal objects lack. For example, an ES6 Map tracks the insertion order of items that are added to it. Here is a more complete overview of its methods: `.has(key)` returns true or false based on the presence of a key `.get(key)` returns the value associated with a key `.set(key, value)` sets a new key, value pair `.delete(key)` removes a key, value pair `.clear()` removes all key, value pairs `.entries()` returns an array of all the keys in insertion order `.values()` returns an array of all the values in insertion order +The new version of JavaScript provides us with a built-in Map object which provides much of the functionality we wrote by hand in the last challenge. This Map object, although similar to regular JavaScript objects, provides some useful functionality that normal objects lack. For example, an ES6 Map tracks the insertion order of items that are added to it. Here is a more complete overview of its methods: + +- `.has(key)` returns true or false based on the presence of a key +- `.get(key)` returns the value associated with a key +- `.set(key, value)` sets a new key, value pair +- `.delete(key)` removes a key, value pair +- `.clear()` removes all key, value pairs +- `.entries()` returns an array of all the keys in insertion order +- `.values()` returns an array of all the values in insertion order # --instructions--