F Exam

Last updated: 2020-06-24 13:45:23

F.1 Topics

The material for the exam includes Chapters 15 and Chapter 7, except for the following topics:

  • Using python to start up local server (Section 5.6.2)
  • Using GitHub to start up local server (Section 5.6.3)
  • The Leaflet library (Sections 7.57.6 and 7.8.17.8.2)
  • The geojson.io and mapshaper web applications (Sections 7.4.17.4.2)

The exam will consist of 10 multiple-choice questions.

F.2 Sample questions

F.2.1 Question 1

Which HTML element is used to create a top-level (largest) heading?

  1. <h1>

  2. <h6>

  3. <heading>

  4. <head>

19.2.1 Question 2

Given the following HTML code for a list with three items:

which CSS code can be used to make the first and third item appear with the same color?

  1. .hot {color: black} .cold {color: blue}

  2. #first {color: red}

  3. #cold {color: blue}

  4. .cold {color: blue}

F.2.2 Question 3

What will be the value of arr after running the following expressions?

  1. [20, 30, 1]

  2. 3

  3. [20, 30]

  4. [20, 30, 30]

F.2.3 Question 4

What will be the value of y after running the following expressions?

  1. undefined

  2. []

  3. [{value: 3}, {value: 4}, {value: 5}]

  4. [3, 4, 5]

F.2.4 Question 5

Given the following static website directory structure:

|-- www
    |-- css
    |   |-- style.css
    |-- js
        |-- jquery.js
    |-- main.js
    |-- index.html

which HTML element should one use to include style.css in index.html?

  1. <link rel="stylesheet" href="style.css">

  2. <script src="style.css">

  3. <link rel="stylesheet" href="css/style.css">

  4. <link rel="stylesheet" href="css+style.css">

F.2.5 Question 6

What will appear in the main browser window when loading an HTML document with the following contents?

  1. The words “Hello” and “world”, on two separate lines

  2. The phrase “Hello world”, on one line

  3. Blank page

  4. The phrase “intro Hello world”, on one line

F.2.6 Question 7

What is the right expression to clear the contents of a paragraph that has id="main"?

  1. document.getElementById("main")[0].innerHTML = "";

  2. document.getElementById("#main").innerHTML = "";

  3. document.getElementById("main").innerHTML = "";

  4. document.getElementById("main").innerHTML = 0;

F.2.7 Question 8

What will be the value of y after running the following expressions?

  1. 41

  2. 42

  3. 43

  4. 44

F.2.8 Question 9

What will be the value of x after running the following expressions?

  1. ["JavaScript",2020]B

  2. ["JavaScript",2021]

  3. [{"course":"JavaScript"},{"year":2020}]B

  4. [{"course":"JavaScript"},{"year":2021},B]

F.2.9 Question 10

What will appear in the main browser window when loading an HTML document with the following contents, and clicking on the button twice?

  1. Hi All

  2. Hi AllHi All

  3. Hi All Hi All Hi All Hi All

  4. Hi AllHi AllHi AllHi All