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.
there is actually no need to save into variables the functions in our answers to these exercises, as we're not asked to then use them as parameters in higher order functions, so we can use a function expression, rather than a function declaration (plus, especially with the concise arrow syntax, we can use functions diretly as argumemts in other functions, or define and call them at the same time as an IIFE, eg. ((n)=> {console.log(n=5);}10); that logs 15)
so goodness
@Gracjandogg You would want measurements taken from production app, leverage monitoring to spot major bottlenecks, and make room for adjustments if the product owner says so, or the performance impact is so much your app is bleeding money.
That's the difference between a senior and a junior. Everything is a tradeoff, and you're better off investing the next hour building stuff that give you ROI, and not just anything you can detect that can be done better.
If you're talking about hot paths? Yes, BUT you will also have to inline any loops, and other things that simply shouldn't exist in non-hotpath code. In sort: You're not wrong, you're just taking things to the absolute extremes by choosing to not use stuff the standard library provides because "slow".
that function thing is making it look so hard.
Why do I forget about regex?
It works well, but it must be refactored as it's really difficult to follow the logic let alone maintain this solution.
yoo so did i
Template literals FTW
generic, works for lists and for strings (and probably iterables in general)
devils in the detail with this one
Hey it could be worst, i know how to use it and still used it wrong .-.
Thankfully the tests don't test for "sample", which is good because the behavior of the function when text is in the array isn't specified anyways, so assuming they are truthy is the only sane way to go.
I don't know why 0 * -1 = -0 in JavaScript which is very different from math. Every number that multiplies with 0 should be result in 0 right?
ofcourse!
This comment is hidden because it contains spoiler information about the solution
Loading more items...