and Verified Answers | Already Graded
A+
how do you insert Javascript into a web page? - 🧠 ANSWER ✔✔with the
script tag:<script type="text/javascript">document.write("Hello
World!");</script>
Where do you put javascripts? - 🧠 ANSWER ✔✔in the head or body
sections.
When do javascripts execute? - 🧠 ANSWER ✔✔immediately. as the page
loads into the browser.
What if you don't want the script to execute immediately upon loading a
page? - 🧠 ANSWER ✔✔then put it inside a function.
where do you place functions and why? - 🧠 ANSWER ✔✔in the head
section, this way they are all in one place, and they do not interfere with
page content.
COPYRIGHT©NINJANERD 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
1
STATEMENT. ALL RIGHTS RESERVED
, when should scripts be placed in the body? - 🧠 ANSWER ✔✔when you
want your script to be placed inside a function, or if your script should write
page conten.
how many scripts can you have in a document? - 🧠 ANSWER ✔✔an
unlimited number.
when should you use an external javascript? - 🧠 ANSWER ✔✔when you
want to run the same JavaScript on several pages, without having to write
the same script on every page.
how should an external javascript be referenced? - 🧠 ANSWER ✔✔<script
type="text/javascript" src="xxx.js"></script>. name the file with a .js
extension.
can the external script contain the <script></script> tags? - 🧠 ANSWER
✔✔No.
where do you place the reference for the external javascript in the html
page? - 🧠 ANSWER ✔✔exactly where you would if it was not external.
what is javascript? - 🧠 ANSWER ✔✔a sequence of statements to be
executed by the browser
COPYRIGHT©NINJANERD 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
2
STATEMENT. ALL RIGHTS RESERVED