<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
var naturalSort = function(a, b) {
return a.localeCompare(b);
};
/* Basic Latin characters http://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin */
var basicLatin = [' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}'];
var basicLatinTwo = [' a', '!a', '"a', '#a', '$a', '%a', '&a', "'a", '(a', ')a', '*a', '+a', ',a', '-a', '.a', '/a', '0a', '1a', '2a', '3a', '4a', '5a', '6a', '7a', '8a', '9a', ':a', ';a', '<a', '=a', '>a', '?a', '@a', 'Aa', 'Ba', 'Ca', 'Da', 'Ea', 'Fa', 'Ga', 'Ha', 'Ia', 'Ja', 'Ka', 'La', 'Ma', 'Na', 'Oa', 'Pa', 'Qa', 'Ra', 'Sa', 'Ta', 'Ua', 'Va', 'Wa', 'Xa', 'Ya', 'Za', '[a', '\\a', ']a', '^a', '_a', '`a', 'aa', 'ba', 'ca', 'da', 'ea', 'fa', 'ga', 'ha', 'ia', 'ja', 'ka', 'la', 'ma', 'na', 'oa', 'pa', 'qa', 'ra', 'sa', 'ta', 'ua', 'va', 'wa', 'xa', 'ya', 'za', '{a', '|a', '}a'];
var basicLatinThree = ['1 a', '1!a', '1"a', '1#a', '1$a', '1%a', '1&a', "1'a", '1(a', '1)a', '1*a', '1+a', '1,a', '1-a', '1.a', '1/a', '10a', '11a', '12a', '13a', '14a', '15a', '16a', '17a', '18a', '19a', '1:a', '1;a', '1<a', '1=a', '1>a', '1?a', '1@a', '1Aa', '1Ba', '1Ca', '1Da', '1Ea', '1Fa', '1Ga', '1Ha', '1Ia', '1Ja', '1Ka', '1La', '1Ma', '1Na', '1Oa', '1Pa', '1Qa', '1Ra', '1Sa', '1Ta', '1Ua', '1Va', '1Wa', '1Xa', '1Ya', '1Za', '1[a', '1\\a', '1]a', '1^a', '1_a', '1`a', '1aa', '1ba', '1ca', '1da', '1ea', '1fa', '1ga', '1ha', '1ia', '1ja', '1ka', '1la', '1ma', '1na', '1oa', '1pa', '1qa', '1ra', '1sa', '1ta', '1ua', '1va', '1wa', '1xa', '1ya', '1za', '1{a', '1|a', '1}a'];
/* sample usages */
console.log( basicLatin.sort(naturalSort) );
console.log( basicLatinTwo.sort(naturalSort) );
console.log( basicLatinThree.sort(naturalSort) );
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. |