Class 6 — Class exam 1 — Numbers, Strings, and JSlint

Covers all course work done to date for HTML, CSS, writing reports, and the background questions in class 1 on the history of the web, and how the internet works.

There is no Javascript in this class exam.

The class exam will be about 75 minutes at the start of the class. Then we will have a break and continue with Javascript.

Look at and become familiar with the exam instructions for class exams and the final examination.

Excample exam questions are given in previous class content descriptions.

Javascript

Javascript topics        Javascript examples

Number and string operations

W3 schools Basic number and string operators

Number operators

Standard arithmetic plus a small library of mathematical functions defined as a math object.
here are the functions: Math.random(),  Math.min(...),  Math.max(...),  Math.round(...),  Math.ceil(...), and Math.floor(...).
There constants: Math.E,  Math.PI,  Math.SQRT2,  Math.LN2,  Math.LN10, MATH.LOG10E, and Math.LOG2E.

Strings and arrays

The most common string operators are used to join strings, split strings, extract substrings, and search.

Using JSlint

You check Javascript syntax using JSLint.

It is very strict and imposes style conventions in addition to syntax. I set the following options to remove "errors" that are not errors.