Timeline for Check whether letters of word are in alphabetical order
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 1, 2015 at 21:45 | history | edited | Tamas | CC BY-SA 3.0 |
deleted 1 character in body
|
Mar 1, 2015 at 21:31 | history | edited | Tamas | CC BY-SA 3.0 |
added 290 characters in body
|
Mar 1, 2015 at 20:04 | comment | added | edc65 |
Using some(or every, same score),87:function i(s){return!s.toUpperCase().split(l='').some(function(c){return(u=l,l=c)<=u})}
|
|
Mar 1, 2015 at 20:03 | comment | added | edc65 |
The same, golfed more,92:function i(s){s.toUpperCase(b=0).split(l='').forEach(function(c){if(c<=l)b=1;l=c});return!b}
|
|
Mar 1, 2015 at 20:02 | comment | added | edc65 |
As is, just caring white space,96:function i(s){b=0;l='';s.toUpperCase().split('').forEach(function(c){if(c<=l)b=1;l=c});return!b}
|
|
Mar 1, 2015 at 19:20 | comment | added | ProgramFOX |
You can remove the space between return and !b to save a char.
|
|
Mar 1, 2015 at 17:42 | history | edited | Tamas | CC BY-SA 3.0 |
answering remarks
|
Mar 1, 2015 at 17:25 | comment | added | edc65 | That's a better idea than mine. Using .some could be even better (52 with ES6) | |
Mar 1, 2015 at 17:23 | history | edited | Tamas | CC BY-SA 3.0 |
deleted 2 characters in body
|
Mar 1, 2015 at 17:16 | history | edited | Tamas | CC BY-SA 3.0 |
corrected logic mistake, 'A'<'z' apparently
|
Mar 1, 2015 at 17:07 | history | edited | Tamas | CC BY-SA 3.0 |
added 7 characters in body
|
Mar 1, 2015 at 17:02 | history | edited | Tamas | CC BY-SA 3.0 |
noting ES5
|
Mar 1, 2015 at 16:56 | history | answered | Tamas | CC BY-SA 3.0 |