The answer depends on where you are right now. If you have never coded before and are not sure it is for you, start with Khan Academy. Its intro to JavaScript or HTML and CSS course takes a few hours and will tell you quickly whether programming interests you, with no commitment required.
If you know you want to become a developer, or you have already done some coding and want a structured path, go to freeCodeCamp. Khan Academy will not take you far enough on its own.
Doing both is also a reasonable approach. Khan Academy to build initial confidence, then freeCodeCamp for the serious curriculum. Many successful developers have followed exactly that sequence.
Not sure where to start? See our
guide to learning to code for free, or check
which platform fits your situation. Want the full rundown of which Khan Academy courses are worth doing first? See our
picks of the best free Khan Academy courses. Want a pick that fits you specifically? Our
platform finder scores your goal and level against every free platform we track and gives you a short list.