Skip to content

Instantly share code, notes, and snippets.

@tleen
Created August 31, 2013 02:13
Show Gist options
  • Save tleen/6395808 to your computer and use it in GitHub Desktop.
Save tleen/6395808 to your computer and use it in GitHub Desktop.
Javascript array of Canadian Provinces
['Alberta', 'British Columbia', 'Manitoba', 'New Brunswick', 'Newfoundland and Labrador', 'Northwest Territories', 'Nova Scotia', 'Nunavut', 'Ontario', 'Prince Edward Island', 'Quebec', 'Saskatchewan', 'Yukon Territory']
@mrobinson537
Copy link

One more version, for those who may need it one day...
var CanadianProvinces = ['AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT'];

@tpv-ebben
Copy link

[ { name: 'Alberta', abbreviation: 'AB' }, { name: 'British Columbia', abbreviation: 'BC' }, { name: 'Manitoba', abbreviation: 'MB' }, { name: 'New Brunswick', abbreviation: 'NB' }, { name: 'Newfoundland and Labrador', abbreviation: 'NL' }, { name: 'Northwest Territories', abbreviation: 'NT' }, { name: 'Nova Scotia', abbreviation: 'NS' }, { name: 'Nunavut', abbreviation: 'NU' }, { name: 'Ontario', abbreviation: 'ON' }, { name: 'Prince Edward Island', abbreviation: 'PE' }, { name: 'Quebec', abbreviation: 'QC' }, { name: 'Saskatchewan', abbreviation: 'SK' }, { name: 'Yukon Territory', abbreviation: 'YT' } ]

@michaelqiji
Copy link

{
"AB": "Alberta",
"BC": "British Columbia",
"MB": "Manitoba",
"NB": "New Brunswick",
"NL": "Newfoundland and Labrador",
"NT": "Northwest Territories",
"NS": "Nova Scotia",
"NU": "Nunavut",
"ON": "Ontario",
"PE": "Prince Edward Island",
"QC": "Quebec",
"SK": "Saskatchewan",
"YT": "Yukon Territory"
}

@florian-do
Copy link

Android Arrays XML file

<?xml version="1.0" encoding="utf-8"?>
<resources>
	<array name="provinces_key">
		<item>AB</item>
		<item>BC</item>
		<item>MB</item>
		<item>NB</item>
		<item>NL</item>
		<item>NT</item>
		<item>NS</item>
		<item>NU</item>
		<item>ON</item>
		<item>PE</item>
		<item>QC</item>
		<item>SK</item>
		<item>YT</item>
	</array>
	
	<array name="provinces_name">
		<item>Alberta</item>
		<item>British Columbia</item>
		<item>Manitoba</item>
		<item>New Brunswick</item>
		<item>Newfoundland &amp; Labrador</item>
		<item>Northwest Territories</item>
		<item>Nova Scotia</item>
		<item>Nunavut</item>
		<item>Ontario</item>
		<item>Prince Edward Island</item>
		<item>Quebec</item>
		<item>Saskatchewan</item>
		<item>Yukon Territories</item>
	</array>
</resources>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment