JSE1: Module 1 Test Answers (JavaScript Essentials 1)

JavaScript Essentials 1 – JSE1: Module 1 Test Answers

1. Using JavaScript, we want to display the word “test” in the console. What statement do we use to do this?

  • console (log, “test”);
  • log(“test”);
  • console(“test”);
  • console.log(“test”);

2. The basic toolkit needed to effectively develop JavaScript code consists of two elements:

  • interpreter, debugger.
  • code editor, debugger.
  • interpreter, package manager.
  • code editor, interpreter.

3. The TypeScript language is:

  • a variant of JavaScript that is compiled rather than interpreted.
  • the original name for JavaScript, which has been changed over time.
  • a new language based on JavaScript which, among other things, introduces static typing.
  • an alternative name for JavaScript.

4. The <html> tag indicates the start of the actual HTML document. What tag should appear at the end of the document?

  • <html/>
  • </html>
  • <lmth>
  • <html>

5. Where will we definitely not be able to execute JavaScript code?

  • In a web browser.
  • In a server environment using node.js.
  • On a mobile device.
  • Directly in the processor.

6. What HTML tag is used to indicate that we are embedding JavaScript code?

  • <source>
  • <script>
  • <js>
  • <execute>

7. What is not the task of the interpreter?

  • Creating a runtime environment for the program.
  • Transforming the individual commands of the source code into the target form.
  • Transforming all program code into target code before execution.
  • Verifying the correctness of the program source code (syntax).

8. In the browser, we type into the address bar a string starting with file:///. This means that:

  • we want the browser to create an empty page for us with the name we give as a continuation of the string.
  • the rest of the string is the path to the file on our local computer that we want to open in the browser.
  • we want to save the page as a local file.
  • we do not want to open the page, but only download a file from the remote address and save it on the local machine.

9. In a browser, we want to open a local file by typing the path to it in the address bar. The path must be preceded by:

  • http://
  • local:///
  • https://
  • file:///

10. A client-side JavaScript program:

  • should be embedded inside an HTML document.
  • may be embedded inside an HTML document or run standalone in the browser.
  • runs directly in a web browser and can contain an HTML document inside it.
  • requires server support to run.

11. HTML is:

  • a language for describing the structure of a web page.
  • a scripting language to support mathematical calculations.
  • one of the data-compression formats.
  • a network protocol.

12. The JavaScript code includes the console.log(“http://test.org”); command. Its execution will:

  • send a log with information about the currently executed script to the indicated address http://test.org.
  • display the following message on the console: “http://test.org”.
  • cause the page http://test.org to be loaded into the browser.
  • display on the console information about the progress of http://test.org page loading.

13. What tag do we use in HTML to denote the main part of the document inside which we define the page elements?

  • <head>
  • <main>
  • <body>
  • <content>

14. Entering about:blank in the address bar of your browser will:

  • generate and load a minimal blank HTML page into the current tab.
  • open a tab with information about your browser.
  • reset the browser to its default settings.
  • generate a page with information about the browser’s status and send it to the developer.

Leave a Reply

Your email address will not be published. Required fields are marked *