---
title: "Discussion on \"Have I Got This Right?\" | Hashnode"
description: "Discussion on \"Have I Got This Right?\". Part 1: JavaScript"
url: "https://hashnode.com/posts/have-i-got-this-right-js/6121729ba5d08237f40e131a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Have I Got This Right?](https://adperci.hashnode.dev/have-i-got-this-right-js?utm_source=hashnode&utm_medium=feed)

Part 1: JavaScript

Aug 21, 2021 · 3 min read · adperci.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#newbie](https://hashnode.com/tag/newbie)

## Written by

[Adam Percival](https://hashnode.com/@AdPerci)

@AdPerci

  
[View profile](https://hashnode.com/@AdPerci)

Learning, learning, and more learning…

## Responses 1

Markdown supported · ⌘↵ to post

[Omobolaji Anuoluwapo](https://hashnode.com/@morganBest)

[Aug 22, 2021](https://hashnode.com/posts/have-i-got-this-right-js/6121729ba5d08237f40e131a/comment/6122aa85e404793819cab713)

Nice write-up Adam. So to answer your question quickly, yes you call your script at the top of your code, you just need an extra line of code in the js file; to parse your script file once the document has finished loading.

[Adam Percival](https://hashnode.com/@AdPerci)

[Aug 28, 2021](https://hashnode.com/posts/have-i-got-this-right-js/6121729ba5d08237f40e131a/comment/6122aa85e404793819cab713#reply-612a54172858872661b99a64)

I figured as much! From what I can gather, that tends to be the common approach, but my guess is that it also depends on the preference of the developer. What's your preference?

[Omobolaji Anuoluwapo](https://hashnode.com/@morganBest)

[Aug 29, 2021](https://hashnode.com/posts/have-i-got-this-right-js/6121729ba5d08237f40e131a/comment/6122aa85e404793819cab713#reply-612aff362858872661b9a49c)

Come on Adam, our aim as developers is to write fewer codes. Since putting it at the top will require me to write an extra line of code, then I sure would prefer to put it at the bottom.
