fac-u / take-me-away

Travel
https://fac-u.github.io/take-me-away/
1 stars 3 forks source link

Slightly confusing order for your functions #46

Closed otajor closed 7 years ago

otajor commented 7 years ago

Here you are calling functions that you only declare later in the file.

Hoisting means that this works fine, but I find it bit counterintuitive to read - why not just have the functions declared in the order that they're used?

msmichellegar commented 7 years ago

I agree. I think it would make more sense to call the functions after they've been declared. Better still, declare the functions in another file and require them in.

stevehopkinson commented 7 years ago

We've modularised all of the code now, so this should no longer be an issue.