8 Programming the Web Mapping in the Cloud Peterson Javascript in Body Body and calculation Function in the head Function in the .js file API as an external .js file Array…