<html>
<head>
<meta name="description" content="Display a list of all the user languages" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<ul id=langs></ul>
</body>
</html>
function update() {
var list = document.querySelector('#langs');
list.innerHTML = '';
var langs = (navigator.languages || [navigator.language])
.map(function(code) {
return languages[code] || code;
})
.forEach(function(lang) {
var item = document.createElement('ul');
item.textContent = lang;
list.appendChild(item)
});
}
window.addEventListener('load', update);
window.addEventListener('languagechange', update);
var languages = {"aa":"Afar","ab":"Abkhazian","ace":"Achinese","ach":"Acoli","ada":"Adangme","ady":"Adyghe","ae":"Avestan","af":"Afrikaans","afa":"Afro-Asiatic Language","afh":"Afrihili","agq":"Aghem","ain":"Ainu","ak":"Akan","akk":"Akkadian","ale":"Aleut","alg":"Algonquian Language","alt":"Southern Altai","am":"Amharic","an":"Aragonese","ang":"Old English","anp":"Angika","apa":"Apache Language","ar":"Arabic","ar-001":"Modern Standard Arabic","arc":"Aramaic","arn":"Mapuche","arp":"Arapaho","art":"Artificial Language","arw":"Arawak","as":"Assamese","asa":"Asu","ast":"Asturian","ath":"Athapascan Language","aus":"Australian Language","av":"Avaric","awa":"Awadhi","ay":"Aymara","az":"Azeri","ba":"Bashkir","bad":"Banda","bai":"Bamileke Language","bal":"Baluchi","ban":"Balinese","bas":"Basaa","bat":"Baltic Language","bax":"Bamun","bbj":"Ghomala","be":"Belarusian","bej":"Beja","bem":"Bemba","ber":"Berber","bez":"Bena","bfd":"Bafut","bg":"Bulgarian","bh":"Bihari","bho":"Bhojpuri","bi":"Bislama","bik":"Bikol","bin":"Bini","bkm":"Kom","bla":"Siksika","bm":"Bambara","bn":"Bengali","bnt":"Bantu","bo":"Tibetan","br":"Breton","bra":"Braj","brx":"Bodo","bs":"Bosnian","bss":"Akoose","btk":"Batak","bua":"Buriat","bug":"Buginese","bum":"Bulu","byn":"Blin","byv":"Medumba","ca":"Catalan","cad":"Caddo","cai":"Central American Indian Language","car":"Carib","cau":"Caucasian Language","cay":"Cayuga","cch":"Atsam","ce":"Chechen","ceb":"Cebuano","cel":"Celtic Language","cgg":"Chiga","ch":"Chamorro","chb":"Chibcha","chg":"Chagatai","chk":"Chuukese","chm":"Mari","chn":"Chinook Jargon","cho":"Choctaw","chp":"Chipewyan","chr":"Cherokee","chy":"Cheyenne","ckb":"Sorani Kurdish","cmc":"Chamic Language","co":"Corsican","cop":"Coptic","cpe":"English-based Creole or Pidgin","cpf":"French-based Creole or Pidgin","cpp":"Portuguese-based Creole or Pidgin","cr":"Cree","crh":"Crimean Turkish","crp":"Creole or Pidgin","cs":"Czech","csb":"Kashubian","cu":"Church Slavic","cus":"Cushitic Language","cv":"Chuvash","cy":"Welsh","da":"Danish","dak":"Dakota","dar":"Dargwa","dav":"Taita","day":"Dayak","de":"German","de-AT":"Austrian German","de-CH":"Swiss High German","del":"Delaware","den":"Slave","dgr":"Dogrib","din":"Dinka","dje":"Zarma","doi":"Dogri","dra":"Dravidian Language","dsb":"Lower Sorbian","dua":"Duala","dum":"Middle Dutch","dv":"Divehi","dyo":"Jola-Fonyi","dyu":"Dyula","dz":"Dzongkha","dzg":"Dazaga","ebu":"Embu","ee":"Ewe","efi":"Efik","egy":"Ancient Egyptian","eka":"Ekajuk","el":"Greek","elx":"Elamite","en":"English","en-AU":"Australian English","en-CA":"Canadian English","en-GB":"U.K. English","en-US":"U.S. English","enm":"Middle English","eo":"Esperanto","es":"Spanish","es-419":"Latin American Spanish","es-ES":"European Spanish","es-MX":"Mexican Spanish","et":"Estonian","eu":"Basque","ewo":"Ewondo","fa":"Persian","fan":"Fang","fat":"Fanti","ff":"Fulah","fi":"Finnish","fil":"Filipino","fiu":"Finno-Ugrian Language","fj":"Fijian","fo":"Faroese","fon":"Fon","fr":"French","fr-CA":"Canadian French","fr-CH":"Swiss French","frm":"Middle French","fro":"Old French","frr":"Northern Frisian","frs":"Eastern Frisian","fur":"Friulian","fy":"Western Frisian","ga":"Irish","gaa":"Ga","gay":"Gayo","gba":"Gbaya","gd":"Scottish Gaelic","gem":"Germanic Language","gez":"Geez","gil":"Gilbertese","gl":"Galician","gmh":"Middle High German","gn":"Guarani","goh":"Old High German","gon":"Gondi","gor":"Gorontalo","got":"Gothic","grb":"Grebo","grc":"Ancient Greek","gsw":"Swiss German","gu":"Gujarati","guz":"Gusii","gv":"Manx","gwi":"Gwichʼin","ha":"Hausa","hai":"Haida","haw":"Hawaiian","he":"Hebrew","hi":"Hindi","hil":"Hiligaynon","him":"Himachali","hit":"Hittite","hmn":"Hmong","ho":"Hiri Motu","hr":"Croatian","hsb":"Upper Sorbian","ht":"Haitian","hu":"Hungarian","hup":"Hupa","hy":"Armenian","hz":"Herero","ia":"Interlingua","iba":"Iban","ibb":"Ibibio","id":"Indonesian","ie":"Interlingue","ig":"Igbo","ii":"Sichuan Yi","ijo":"Ijo","ik":"Inupiaq","ilo":"Iloko","inc":"Indic Language","ine":"Indo-European Language","inh":"Ingush","io":"Ido","ira":"Iranian Language","iro":"Iroquoian Language","is":"Icelandic","it":"Italian","iu":"Inuktitut","ja":"Japanese","jbo":"Lojban","jgo":"Ngomba","jmc":"Machame","jpr":"Judeo-Persian","jrb":"Judeo-Arabic","jv":"Javanese","ka":"Georgian","kaa":"Kara-Kalpak","kab":"Kabyle","kac":"Kachin","kaj":"Jju","kam":"Kamba","kar":"Karen","kaw":"Kawi","kbd":"Kabardian","kbl":"Kanembu","kcg":"Tyap","kde":"Makonde","kea":"Kabuverdianu","kfo":"Koro","kg":"Kongo","kha":"Khasi","khi":"Khoisan Language","kho":"Khotanese","khq":"Koyra Chiini","ki":"Kikuyu","kj":"Kuanyama","kk":"Kazakh","kkj":"Kako","kl":"Kalaallisut","kln":"Kalenjin","km":"Khmer","kmb":"Kimbundu","kn":"Kannada","ko":"Korean","kok":"Konkani","kos":"Kosraean","kpe":"Kpelle","kr":"Kanuri","krc":"Karachay-Balkar","krl":"Karelian","kro":"Kru","kru":"Kurukh","ks":"Kashmiri","ksb":"Shambala","ksf":"Bafia","ksh":"Colognian","ku":"Kurdish","kum":"Kumyk","kut":"Kutenai","kv":"Komi","kw":"Cornish","ky":"Kirghiz","la":"Latin","lad":"Ladino","lag":"Langi","lah":"Lahnda","lam":"Lamba","lb":"Luxembourgish","lez":"Lezghian","lg":"Ganda","li":"Limburgish","lkt":"Lakota","ln":"Lingala","lo":"Lao","lol":"Mongo","loz":"Lozi","lt":"Lithuanian","lu":"Luba-Katanga","lua":"Luba-Lulua","lui":"Luiseno","lun":"Lunda","luo":"Luo","lus":"Mizo","luy":"Luyia","lv":"Latvian","mad":"Madurese","maf":"Mafa","mag":"Magahi","mai":"Maithili","mak":"Makasar","man":"Mandingo","map":"Austronesian Language","mas":"Masai","mde":"Maba","mdf":"Moksha","mdr":"Mandar","men":"Mende","mer":"Meru","mfe":"Morisyen","mg":"Malagasy","mga":"Middle Irish","mgh":"Makhuwa-Meetto","mgo":"Meta'","mh":"Marshallese","mi":"Maori","mic":"Micmac","min":"Minangkabau","mis":"Miscellaneous Language","mk":"Macedonian","mkh":"Mon-Khmer Language","ml":"Malayalam","mn":"Mongolian","mnc":"Manchu","mni":"Manipuri","mno":"Manobo Language","mo":"Moldavian","moh":"Mohawk","mos":"Mossi","mr":"Marathi","ms":"Malay","mt":"Maltese","mua":"Mundang","mul":"Multiple Languages","mun":"Munda Language","mus":"Creek","mwl":"Mirandese","mwr":"Marwari","my":"Burmese","mye":"Myene","myn":"Mayan Language","myv":"Erzya","na":"Nauru","nah":"Nahuatl","nai":"North American Indian Language","nap":"Neapolitan","naq":"Nama","nb":"Norwegian Bokmål","nd":"North Ndebele","nds":"Low German","ne":"Nepali","new":"Newari","ng":"Ndonga","nia":"Nias","nic":"Niger-Kordofanian Language","niu":"Niuean","nl":"Dutch","nl-BE":"Flemish","nmg":"Kwasio","nn":"Norwegian Nynorsk","nnh":"Ngiemboon","no":"Norwegian","nog":"Nogai","non":"Old Norse","nqo":"N’Ko","nr":"South Ndebele","nso":"Northern Sotho","nub":"Nubian Language","nus":"Nuer","nv":"Navajo","nwc":"Classical Newari","ny":"Nyanja","nym":"Nyamwezi","nyn":"Nyankole","nyo":"Nyoro","nzi":"Nzima","oc":"Occitan","oj":"Ojibwa","om":"Oromo","or":"Oriya","os":"Ossetic","osa":"Osage","ota":"Ottoman Turkish","oto":"Otomian Language","pa":"Punjabi","paa":"Papuan Language","pag":"Pangasinan","pal":"Pahlavi","pam":"Pampanga","pap":"Papiamento","pau":"Palauan","peo":"Old Persian","phi":"Philippine Language","phn":"Phoenician","pi":"Pali","pl":"Polish","pon":"Pohnpeian","pra":"Prakrit Language","pro":"Old Provençal","ps":"Pushto","pt":"Portuguese","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","qu":"Quechua","raj":"Rajasthani","rap":"Rapanui","rar":"Rarotongan","rm":"Romansh","rn":"Rundi","ro":"Romanian","roa":"Romance Language","rof":"Rombo","rom":"Romany","root":"Root","ru":"Russian","rup":"Aromanian","rw":"Kinyarwanda","rwk":"Rwa","sa":"Sanskrit","sad":"Sandawe","sah":"Sakha","sai":"South American Indian Language","sal":"Salishan Language","sam":"Samaritan Aramaic","saq":"Samburu","sas":"Sasak","sat":"Santali","sba":"Ngambay","sbp":"Sangu","sc":"Sardinian","scn":"Sicilian","sco":"Scots","sd":"Sindhi","se":"Northern Sami","see":"Seneca","seh":"Sena","sel":"Selkup","sem":"Semitic Language","ses":"Koyraboro Senni","sg":"Sango","sga":"Old Irish","sgn":"Sign Language","sh":"Serbo-Croatian","shi":"Tachelhit","shn":"Shan","shu":"Chadian Arabic","si":"Sinhala","sid":"Sidamo","sio":"Siouan Language","sit":"Sino-Tibetan Language","sk":"Slovak","sl":"Slovenian","sla":"Slavic Language","sm":"Samoan","sma":"Southern Sami","smi":"Sami Language","smj":"Lule Sami","smn":"Inari Sami","sms":"Skolt Sami","sn":"Shona","snk":"Soninke","so":"Somali","sog":"Sogdien","son":"Songhai","sq":"Albanian","sr":"Serbian","srn":"Sranan Tongo","srr":"Serer","ss":"Swati","ssa":"Nilo-Saharan Language","ssy":"Saho","st":"Southern Sotho","su":"Sundanese","suk":"Sukuma","sus":"Susu","sux":"Sumerian","sv":"Swedish","sw":"Swahili","swb":"Comorian","swc":"Congo Swahili","syc":"Classical Syriac","syr":"Syriac","ta":"Tamil","tai":"Tai Language","te":"Telugu","tem":"Timne","teo":"Teso","ter":"Tereno","tet":"Tetum","tg":"Tajik","th":"Thai","ti":"Tigrinya","tig":"Tigre","tiv":"Tiv","tk":"Turkmen","tkl":"Tokelau","tl":"Tagalog","tlh":"Klingon","tli":"Tlingit","tmh":"Tamashek","tn":"Tswana","to":"Tongan","tog":"Nyasa Tonga","tpi":"Tok Pisin","tr":"Turkish","trv":"Taroko","ts":"Tsonga","tsi":"Tsimshian","tt":"Tatar","tum":"Tumbuka","tup":"Tupi Language","tut":"Altaic Language","tvl":"Tuvalu","tw":"Twi","twq":"Tasawaq","ty":"Tahitian","tyv":"Tuvinian","tzm":"Central Atlas Tamazight","udm":"Udmurt","ug":"Uighur","uga":"Ugaritic","uk":"Ukrainian","umb":"Umbundu","und":"Unknown Language","ur":"Urdu","uz":"Uzbek","vai":"Vai","ve":"Venda","vi":"Vietnamese","vo":"Volapük","vot":"Votic","vun":"Vunjo","wa":"Walloon","wae":"Walser","wak":"Wakashan Language","wal":"Wolaytta","war":"Waray","was":"Washo","wen":"Sorbian Language","wo":"Wolof","xal":"Kalmyk","xh":"Xhosa","xog":"Soga","yao":"Yao","yap":"Yapese","yav":"Yangben","ybb":"Yemba","yi":"Yiddish","yo":"Yoruba","ypk":"Yupik Language","yue":"Cantonese","za":"Zhuang","zap":"Zapotec","zbl":"Blissymbols","zen":"Zenaga","zgh":"Standard Moroccan Tamazight","zh":"Chinese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese","znd":"Zande","zu":"Zulu","zun":"Zuni","zxx":"No linguistic content","zza":"Zaza"};
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |