JavaScript Exam

The JavaScript exam is based on the Intended Learning Outcomes (ILOs) listed below.

You must log in to take a sample exam.

1. JavaScript Operators, Methods, and Keywords (20%, 8 questions)

Candidates can:

1.1. Analyze and debug code that uses assignment and arithmetic operators

  • Assignment, increment, decrement, addition, subtraction, division, multiplication, modulus, compound assignment operators (+=, -=, *=, /=, %=)

1.2. Implement JavaScript best practices

  • Comments, indentation, naming conventions, noscript, constants, reserved keywords, debugger keyword, setting breakpoints, console.log

1.3. Evaluate the use of internal and external scripts

  • When to use, how to use, and what happens when scripts are used at multiple levels

1.4. Implement exception handling

  • try, catch, finally

1.5. Analyze and debug code that interacts with the Browser Object Model (BOM)

  • Displaying dialogs, determining screen size

2. Variables, Data Types, and Functions (25%, 10 questions)

Candidates can:

2.1. Compare and contrast the declaration and use of variables of primitive data types

  • Number, Boolean, String, null, undefined, type of operator, type-checking functions, use strict, converting between data types (parseInt, parseFloat), formatting numbers, string operations, eval(), toFixed(), toLocaleString(), toPrecision(), single quote vs. double quote (nesting), initialization

2.2. Compare and contrast the declaration and use of  arrays

  • Single-dimensional arrays; multi-dimensional arrays; iteration; initialization; defining, sorting, and searching an array; push, pop, shift, and unshift methods; length property; accessing an array element

2.3. Analyze and debug code that uses objects

  • Properties, methods, instantiation, Date object, retrieving date and time parts, localizing date format (MM/DD vs DD/MM), adding and subtracting dates

2.4. Analyze and debug code that uses built-in Math functions

  • random, round, abs, floor, ceil, min, max, pow, sqrt

2.5. Analyze and debug functions that accept parameters and return values

  • Reusable code, local vs. global scope, redefining variables, passing parameters, value vs. reference, return values

3. Decisions and Loops (15%, 6 questions)

Candidates can:

3.1. Evaluate expressions that use logical and comparison operators

  • !=, <, >, <=, >=, !, ==, &&, ||

3.2. Analyze and debug decision statements

  • Single alternative (if), dual alternative (if else), multiple alternative (switch), nested if

3.3. Analyze and debug loops

  • for, for in, while, do while, break, continue

4. Document Object Model (25%, 10 questions)

Candidates can:

4.1. Review and construct the Document Object Model (DOM) tree

  • window, document, body, other HTML elements

4.2. Implement document, form, keyboard, and mouse event handlers

  • onload, onfocus, onblur, onchange, onkeydown, onkeyup, onkeypress, onclick, onmouseover, onmouseout

4.3. Analyze and debug code that outputs to an HTML document

  • document.write, innerHTML, textContent

4.4. Analyze and debug code that locates, modifies, and adds HTML elements and attributes to documents

  • getElementByld, getElementsByTagName, getElementsByClassName, setAttribute, createElement

4.5. Create events using event handlers and listeners

  • DOM events, HTML attribute event, addEventListener

5. HTML Forms (15%, 6 questions)

Candidates can:

5.1. Analyze and debug code that retrieves form input and sets form field values

  • Retrieving form values; identifying the DOM path; getting values from different types of elements; prepopulating, masking, and updating values

5.2. Analyze and debug code that performs input validation

  • Case, string comparisons, Not-A-Number (NaN), not blank

5.3. Describe the form submission process

  • onsubmit, POST vs. GET, potential targets for submission

You will need to use a special browser that uses camera proctoring while you take the exam. The exam consists of forty (40) multiple choice questions. Each question has three (3) answer options, exactly one (1) of which is correct. You should answer all questions, since there is no penalty for questions answered incorrectly, but you will not get any points for questions left unanswered.  To pass, you must answer at least 27 questions correctly. You will have 60 minutes to take the exam.

Ordering the exam entitles you to sit for one (1) exam attempt.

This is one of the four exams you must pass, in addition to writing a Reflection Report, to earn the CFSD® diploma.


 

Scroll to Top