What's the best way to learn to code?

I know there are a million options out there. For a beginner looking to code, or at least to understand some basics, what’s typically the best way to learn the ropes?

Try freeCodeCamp, they have up to date curriculum if you are looking into getting web development and/or JavaScript.