Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
i think it was from your early days of learning isn't it? i just explained to look documentation because i thought your are a beginner at coding.
don't call it as a solution 🤣
everything went smoothly until i saw this kata 😂 i used a brute force method and it didn't workout well. i'll bookmark this and come back after i learn JS better 😵
but only if it's one line if the arrow function consist of more than one line we need to explicitly write 'return' in our code.
clone the array before modifying it! this is the best practice 🙂
modifying a function's parameters with splice is not a good practice(because it's permanently change the original array). make a copy of the array and modify it 🙂
This comment is hidden because it contains spoiler information about the solution
to be honest i got annoyed at first because the round is not working on some cases then got to know about num.toFixed(2) and it solved the issue. thank you for making me more stronger
if you just spent 10min on StackOverflow you don't have to write some code like this! do the research and you don't need to write code from the top of your head. refer documentation and use google when you are stuck! 🙂
This comment is hidden because it contains spoiler information about the solution
clever? maybe for this question but what will you do if you need to move 15 characters or 5 characters instead of 10🤷♂️ it's hard to create two array like this for all situations. my point is this code is not reproduceable!
you can also use map method to this kata instead of traditional for loop
description is not good, it could have focused on the problem we need to solve.
i like this office 😂
gave the idea of using map 2 times to read all individual elements of the array. nice kata
Loading more items...