Alberta A lake surrounded by mountains

Divided from British Columbia by the Rocky Mountains, over which gusts of wind, known as chinooks, keep the southern part of the province considerably warmer than its eastern neighbours during the winter.

British Columbia Photograph of a forested coastline, with mountains beyond

British Columbia is part of the Cascadia region, bounded by the Pacific Ocean on the west and the Rocky Mountains to the east. The environment ranges from temperate rain forest to extremely cold in the north.


Manitoba is sparsely populated, especially in the north, which is dominated by arctic tundra and the Canadian Shield, a vast area of igneous rock that forms the ancient geological core of the North American continent.

New Brunswick White lighthouse decorated with a red cross photographed in front of a fog bank

One of Canada’s three Maritime provinces, bordering the Atlantic ocean. It is the only constitutionally bilingual province, partly due to the presence of the large Acadian population.

Newfoundland & Labrador Scattered houses on a bluff above the ocean

The area has a deep history, being inhabited by the Beothuk, Inuit, Mi'kmaq and Innu for thousands of years. European content began in 1001 CE, when the area was temporarily settled by Vikings.

Nova Scotia A lighthouse at dusk, shot from below, with rocks in the foreground

Canada’s second-smallest province is almost completely surrounded by water. It’s unique geographical history has also made it a valuable location for fossils, mostly from the Carboniferous, Triassic and Jurassic periods.

Northwest Territories Rust-red houseboats on a blue river

Part of Canada since 1870, the Northwest Territories were subdivided in 1999 to form the territory of Nunavut, gaining the portion that has a slightly warmer climate and taiga forest.

Nunavut Yellow buildings against a frozen ocean

The largest Canadian territory, with a land area equivalent to Western Europe. Also the least populous, with just over 30,000 permanent citizens. Nunavut also has the northernmost permanent habitat in the world in the form of the Alert scientific outpost.

Ontario Old buildings of Parliament Hill reflected in a curve of the Ottawa river during fall

Canada’s most populous province, with nearly 40% of the population, much of it clustered around Lake Ontario and in the city of Toronto, Canada’s largest city. Ontario also holds the nation’s capital of Ottawa.

Prince Edward Island A beach boardwalk through pink grass

The smallest province in both land area and population, Prince Edward Island grows 25% of the nation's potatoes.

Quebec Photograph of Quebec city showing old and modern buildings against a lake, behind a green hill

Quebec is Canada’s second-largest province, and the only one to use French as its sole official language. Independence movements have played a significant role in the history and politics of the province.

Saskatchewan Old weathered grain silos against a blue sky

Saskatchewan's location near the geographical center of the country creates an environment with the greatest range of temperature in Canada, from 40°C in the summer to -40°C in winter.

Yukon A range of rocky snowcapped mountains, partly hidden by cloud

The Yukon escaped glaciation during the last Ice Age, making it a welcome home for the First Nations. Today ¾ of the population lives in the territory’s only city of Whitehorse; the second-largest habitation has just 2000 people.

In previous articles I’ve demonstrated how SVG can be used to create responsive, scalable imagemaps, but have left the interactive part - aside from simple hover effects - largely unexplored, with a few exceptions. That changes with this article and the one following, which explore how to create a full, in-depth interface using and : in this case, a geographical map.

A Pez dispenser with a Tweety Bird head

As I’ve previously discussed, arrays are variables with infinite “slots” for data. These slots can be filled from all kinds of sources: selections of DOM elements, random numbers, text, etc. It’s very common to loop over this data to perform some operation, but it’s also common to extract or insert more data, or to trim the array. That’s what push, pop, shift and unshift are for.