6 kyu
Emotional Sort ( ︶︿︶)
1,215 of 2,517Phares
Loading description...
Arrays
Fundamentals
Sorting
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
CoffeeScript translation
Rust challenge
Java Translation
TypeScript Translation
This comment has been hidden.
Here is a fork that fixes the issue. Also, it adds
Fixed Tests
on theATTEMPT
. I merely commented out theconsole
describing the type of random test; so that can be reverted if better.Thanks for the help!
nice kata
My program for this test \ [ ':(', ':D', 'T_T', ':)' ] false \. Outputs the following \ [ 'T_T', ':(', ':)', ':D' ] \. But it gives me an error \ expected [ 'T_T', ':(', ':)', ':D' ] to deeply equal [] \ Please tell me what the problem is.
your code mutates the input
Oh, that was really the problem. Thank you very much :D
Nice kata!
JS:
chai
&&assert
should be usedDescription should be language-agnostic
Python update (new testing framework)
Approved!
Thanks!
This comment has been hidden.
I tried attempting the blind cases and got this error in the console: "Error: kata.js: Unexpected token, expected ( (18:10)"
This looks like your code's problem. Check parentheses and braces ;-)
(Also I'd suggest to avoid the use of the
Babel
language versions whenever possible, they give very bad error messages about syntax errors in code.)Ah! You're right, I had an else if statement without any arguments set up. ::facepalm:: I have a question, what do you mean by Babel language versions? I'm still a extreme novice with JS and I'm not familiar with the term or what it involves.
If you look at above the code window there's a dropdown next to language version (the one says
JavaScript
) and it should sayNode
something. That's the version of the language you're using.It's very important because you need to check the compiler/runtime version to know what's available and what's deprecated (e.g
Node 0.11
won't have any ES6 stuff) ;-) For Node you should choose the latest version in general, but I wouldn't suggest theBabel
ones because of the above reason.Oh, and by the way,
Babel
is a transpiler for JS. Basically it takes JS code and tranform it into different JS code, for compability or (psuedo) support for newer language features ahead of the JS engine version.Voile you are beyond awesome, thanks so much for the detailed explanation! I honestly hadn't paid that Node setting up there any mind, but I'll definitely will from now on :D
Maybe a little to easy for 6kyu?
(๑•̀ㅁ•́ฅ✧
( ͡° ͜ʖ ͡°)