Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This typeof Operator worksheet is part of the JavaScript Coding without HTML and CSS journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1typeof "hello" | Atypeof true | |
| 2typeof 42 | BWrong - the full operator is 'typeof', not 'type' | |
| 3Checks the data type of a value | Ctypeof | |
| 4Returns a string naming a boolean's type | DReturns "string" | |
| 5console.log(Typeof name); | EWrong - 'typeof' must be lowercase | |
| 6console.log(type age); | FReturns "number" |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
typeof — An operator that returns a string naming the data type of a value.console.log(typeof name);console.log(typeof age);let result = typeof isReady;console.log(typeof 42);let kind = typeof "hi";