This example uses the Data layer to create a polygon with two internal holes. If you don't use the data layer to create an inner hole, you must define a path wound in the opposite direction to the outer path as shown in this alternative.
Read the documentation.
Git and Node.js are required to run this sample locally. Follow these instructions to install Node.js and NPM. The following commands clone, install dependencies and start the sample application.
git clone -b sample-layer-data-polygon https://github.com/googlemaps/js-samples.git
Other samples can be tried by switching to any branch beginning with
git checkout sample-SAMPLE_NAME