I got two "unexpected token" errors (in my editor) for this both lines, but they are working! What’s the fail?
Error 1 (unexpected token ">")
var nameclean = name.replace(/\b(?:ä|ö|ü|ß)\b/gi, matched => umlauts[matched]);
Error 2 (unexpected token "...style1,")
var style1 = {color: '#d5913c', weight:"4", fillColor:"#555555", fillOpacity:"0.8"};
var markers = [];
var marker1 = L.circleMarker([000,000],{...style1, alt:"description1"}).addTo(map).on("click", circleClick).bindPopup
('<div>Hello</div>').bindTooltip("Hello");
markers.push(marker1);
>Solution :
I got two "unexpected token" errors (in my editor) for this both lines, but they are working! What’s the fail?
You’re using a syntax checker which either doesn’t support those JavaScript syntax features or is configured to check against an older version of JS.
Arrow functions and spread syntax were introduced in ES6. It looks like your checker is still on ES5.