r/badcode • • Jan 01 '19

[deleted by user]

[removed]

136 Upvotes

87 comments sorted by

View all comments

Show parent comment

1

u/Naouak Jan 02 '19

That's because you've not started with a language like javascript as your first language that those 2 firsts points seems far fetched.

If you've used any REPL/console, then it is easy to deduce that a function is a string, it may even be more obvious if you don't understand how code is interpreted. You wrote some text to execute, why wouldn't you be able to access it?

I'm often baffled by how juniors interpret stuff that we take for granted when you are a seasoned programer. Most of us have not started by learning javascript and we often apply knowledge from other language to it. If you've learn programing with C and never read anything about arrays in any high level languages, then you will think that any array is of fixed length and that it can only include on type of things.

1

u/Tynach Jan 03 '19

That's a good point.. Sometimes I feel like I'm still a junior, but I guess that just depends on semantics; I haven't yet managed to get a job in the field, but I've had my degree in it for 2 years and started studying it back in late gradeschool/early junior high. I guess I'd say I'm not a beginner, but I would probably be considered a junior developer simply from lack of real-world experience.