JSFiddle - React, Tailwind, and code Playground

by swaff

HTML

<button onclick="test()">test</button>

JavaScript

function test(){

    var myMap = {london: ['clapham', 'chelsea'], bristol:['clifton', 'redland']}
             
    alert(myMap.london[0]);
    alert(myMap['bristol'][1]);
}