Maps a set of keys to values in Javascript