Open up the 'web console' in Chrome/Firefox with F12 or Ctrl + Shift + J
Be sure to select the tab 'Console'
let's do some typing:
console.log('hello world')
var ams = turf.point(52.372410, 4.896554);
var jhb = turf.point(-26.193613, 28.027536);
turf.distance(ams, jhb, 'kilometers');
turf.distance(ams, jhb, 'miles');
turf.distance(ams, jhb, 'radians');
// add a polygon around south africa
var polygon = turf.polygon([ [
[-22.025510, 33.747421], [-22.025510, 16.872420],
[-34.814657, 16.872420], [-34.814657, 33.747421]
]
]);
point_fc = turf.featurecollection([ams, jhb]);
polygon_fc = turf.featurecollection([polygon]);
turf.within(point_fc, polygon_fc);