0
Challenge · 02Before You Write Any Code
What a coding problem is
Foundationsused in ~100% of apps
The first time most people open a coding site they freeze, because they do not know what is being asked of them mechanically. Not the problem itself. The shape of the whole thing. What do I type, where does it go, and who decides if I am right?
Core idea. You write one function. Something hands it an input and takes back what you return. A list of prepared cases compares what you returned against what was expected. That comparison is all the judge is.
poke it, drag it,
try to break it
try to break it
no slides here.
you drive.
you drive.
Playground, this isn't a screenshot
Your function
function biggest(nums) {
let best = 0;
for (const n of nums) {
if (n > best) best = n;
}
return best;
}↑ play a little first, then dig in