Efficient learning via efficient code vs. simply passing

I am looking for the opinion of others. I posted a similar question elsewhere but in relation to a more specific question but figured it might be potentially useful to beginners if they run across this.

Question: If a piece of code passes a challenge in one browser but does not in another because the code could be refactored to be more efficient, do you think a learning beginner should focus on writing code that passes all browsers or settle for passing a challenge with less-than-ideally-efficient code?

Going from a working (or working-ish) solution to a better solution is a good skill and habit to build.

1 Like