Certified DHTML and JavaScript Developer Practice Exam, Exams of Technology

Focused on dynamic web development, this exam assesses knowledge of DHTML (Dynamic HTML) and JavaScript. Topics include DOM manipulation, event handling, form validation, and creating interactive web pages.

Typology: Exams

2025/2026

Available from 12/25/2025

shilpi-jain-1
shilpi-jain-1 šŸ‡®šŸ‡³

4.2

(5)

29K documents

1 / 84

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Certified DHTML and JavaScript Developer Practice
Exam
Question 1. Which of the following keywords in JavaScript does NOT support block-level scoping?
A) let
B) const
C) var
D) None of the above
Answer: C
Explanation: The var keyword is function-scoped, not block-scoped, whereas let and const are block-
scoped.
Question 2. What is the result of the following expression: typeof null?
A) "null"
B) "object"
C) "undefined"
D) "boolean"
Answer: B
Explanation: In JavaScript, typeof null returns "object" due to a legacy bug.
Question 3. Which operator checks both value and type for equality?
A) ==
B) !=
C) ===
D) =
Answer: C
Explanation: The strict equality operator (===) compares both value and type.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54

Partial preview of the text

Download Certified DHTML and JavaScript Developer Practice Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which of the following keywords in JavaScript does NOT support block-level scoping? A) let B) const C) var D) None of the above Answer: C Explanation: The var keyword is function-scoped, not block-scoped, whereas let and const are block- scoped. Question 2. What is the result of the following expression: typeof null? A) "null" B) "object" C) "undefined" D) "boolean" Answer: B Explanation: In JavaScript, typeof null returns "object" due to a legacy bug. Question 3. Which operator checks both value and type for equality? A) == B) != C) === D) = Answer: C Explanation: The strict equality operator (===) compares both value and type.

Exam

Question 4. What will be the result of 5 + "5" in JavaScript? A) 10 B) "55" C) NaN D) Error Answer: B Explanation: The number is coerced to a string, resulting in string concatenation. Question 5. Which logical operator returns true only if both operands are true? A) || B) && C)! D) ?? Answer: B Explanation: The AND operator (&&) returns true only when both operands are true. Question 6. What is the default value of an uninitialized variable declared using var? A) null B) undefined C) 0 D) "" Answer: B Explanation: Uninitialized variables have the value undefined by default.

Exam

Question 10. Which of the following is a falsy value in JavaScript? A) "false" B) 1 C) 0 D) "0" Answer: C Explanation: 0 is a falsy value; "false" and "0" are truthy strings. Question 11. What does the following statement return: Boolean("") A) true B) false C) undefined D) null Answer: B Explanation: An empty string is falsy, so Boolean("") returns false. Question 12. What is the output of typeof Symbol('id')? A) "object" B) "symbol" C) "string" D) "function" Answer: B Explanation: typeof Symbol('id') returns "symbol".

Exam

Question 13. Which of the following is NOT a primitive type in JavaScript? A) Object B) Number C) String D) Boolean Answer: A Explanation: Object is not a primitive type. Question 14. Which operator can be used to combine two or more strings? A) + B) * C) & D) | Answer: A Explanation: The + operator concatenates strings. Question 15. What is the result of '10' == 10? A) true B) false C) undefined D) Error Answer: A Explanation: == performs type coercion, so '10' == 10 is true.

Exam

Question 19. What does the following code return: typeof undefined? A) "null" B) "undefined" C) "object" D) "boolean" Answer: B Explanation: typeof undefined is "undefined". Question 20. What is the result of Boolean(NaN)? A) true B) false C) undefined D) NaN Answer: B Explanation: NaN is a falsy value. Question 21. Which statement will correctly check if a variable is NOT undefined? A) variable !== undefined B) variable = undefined C) variable == null D) variable === null Answer: A Explanation: !== checks both value and type.

Exam

Question 22. What does the following code output: console.log(2 ** 3)? A) 6 B) 8 C) 9 D) 23 Answer: B Explanation: ** is the exponentiation operator; 2 ** 3 = 8. Question 23. Which of the following is a valid way to declare a variable? A) variable name B) let name C) declare name D) define name Answer: B Explanation: let is used to declare variables. Question 24. Which operator is used for strict inequality? A) != B) !== C) = D) == Answer: B Explanation: !== checks both value and type for inequality.

Exam

Question 28. Which statement creates a constant whose value cannot be changed? A) var PI = 3.14; B) const PI = 3.14; C) let PI = 3.14; D) PI = 3.14; Answer: B Explanation: const declares a constant. Question 29. Which of the following is NOT a valid JavaScript variable name? A) $value B) _value C) value D) 1value Answer: D Explanation: Variable names cannot begin with a digit. Question 30. Which statement is true about type coercion in JavaScript? A) It happens only with strict equality. B) It converts values to a common type when using ==. C) It prevents comparison of different types. D) It throws errors for mismatched types. Answer: B Explanation: == triggers type coercion.

Exam

Question 31. Which of these will result in NaN? A) "5" + 5 B) "five" - 2 C) 5 * "5" D) "10" / 2 Answer: B Explanation: "five" cannot be converted to a number. Question 32. What is the output of typeof function() {}? A) "object" B) "function" C) "undefined" D) "null" Answer: B Explanation: typeof for functions returns "function". Question 33. Which keyword allows variable declaration with block scope? A) var B) let C) function D) static Answer: B Explanation: let creates block-scoped variables.

Exam

Question 37. Which operator can be used for logical OR? A) && B) || C) ?? D)! Answer: B Explanation: || is the logical OR operator. Question 38. Which keyword is used for declaring variables with function scope? A) const B) let C) var D) static Answer: C Explanation: var is function-scoped. Question 39. Which of the following is NOT a comparison operator? A) == B) === C) <= D) ++ Answer: D Explanation: ++ is an increment operator.

Exam

Question 40. What will the following output: typeof NaN? A) "undefined" B) "object" C) "number" D) "NaN" Answer: C Explanation: typeof NaN is "number". Question 41. Which statement is true about variables declared using const? A) Their value can be changed. B) Their reference cannot be changed. C) They are always global. D) They are block-scoped. Answer: D Explanation: const is block-scoped. Question 42. What does the following code output: console.log(!true)? A) true B) false C) undefined D) null Answer: B Explanation: !true is false.

Exam

Question 46. Which primitive type represents unique, immutable values? A) Symbol B) Number C) String D) Object Answer: A Explanation: Symbol represents unique values. Question 47. What is the output of Boolean("false")? A) true B) false C) undefined D) null Answer: A Explanation: Non-empty strings are truthy. Question 48. Which operator is used to access object properties? A). B) [] C) () D) {} Answer: A Explanation:. is used to access object properties.

Exam

Question 49. Which of the following is NOT a primitive type? A) Boolean B) Object C) String D) Undefined Answer: B Explanation: Object is not a primitive type. Question 50. What does the following code output: typeof 123n? A) "number" B) "bigint" C) "undefined" D) "object" Answer: B Explanation: typeof 123n returns "bigint". Question 51. Which statement is used for conditional branching? A) if B) for C) switch D) while Answer: A Explanation: if is used for conditional branching.

Exam

Question 55. Which keyword skips the current loop iteration? A) break B) continue C) return D) exit Answer: B Explanation: continue skips to the next iteration. Question 56. Which loop iterates over the values of an array? A) for...in B) for...of C) while D) switch Answer: B Explanation: for...of iterates over values. Question 57. Which loop iterates over the keys of an object? A) for...in B) for...of C) while D) if Answer: A Explanation: for...in iterates over object keys.

Exam

Question 58. What does the following code output: for (let i = 0; i < 3; i++) { console.log(i); } A) 0 1 2 B) 1 2 3 C) 0 1 2 3 D) 1 2 Answer: A Explanation: Loop runs for i = 0, 1, 2. Question 59. Which statement is used to declare a function? A) function name() {} B) let name = function() {} C) const name = () => {} D) All of the above Answer: D Explanation: All three declare functions in different ways. Question 60. What is the scope of a function declared within another function? A) Global B) Block C) Local to the outer function D) Object Answer: C Explanation: Inner functions are scoped locally.