CIW JavaScript Specialist (1D0635) Exam, Exams of Technology

Earlier version of CIW JavaScript exam, covering functions, objects, forms, error handling, and ECMAScript standards.

Typology: Exams

2024/2025

Available from 08/31/2025

BookVenture
BookVenture šŸ‡®šŸ‡³

3.2

(20)

26K documents

1 / 181

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CIW JavaScript Specialist (1D0635)
Exam
Question 1. Which of the following best describes JavaScript?
A) Compiled, statically-typed language
B) Object-based, interpreted scripting language
C) Procedural, compiled language
D) Markup language
Answer: B
Explanation: JavaScript is an object-based scripting language that is
interpreted, not compiled, and is primarily used to add interactivity to
web pages.
Question 2. Which of these can JavaScript run on?
A) Only client-side
B) Only server-side
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
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download CIW JavaScript Specialist (1D0635) Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which of the following best describes JavaScript? A) Compiled, statically-typed language B) Object-based, interpreted scripting language C) Procedural, compiled language D) Markup language Answer: B Explanation: JavaScript is an object-based scripting language that is interpreted, not compiled, and is primarily used to add interactivity to web pages. Question 2. Which of these can JavaScript run on? A) Only client-side B) Only server-side

Exam

C) Both client-side and server-side D) Only in desktop applications Answer: C Explanation: JavaScript can run on both the client side (in the browser) and the server side (using environments like Node.js). Question 3. What is the correct syntax to declare a variable in JavaScript? A) let myVar; B) variable myVar; C) int myVar; D) declare myVar; Answer: A

Exam

A) B) # comment C) // comment D) /* comment */ Answer: C Explanation: Single-line comments in JavaScript start with //. Question 6. What is the result of the expression: 2 + '2' in JavaScript? A) 4 B) 22 C) '4' D) Error

Exam

Answer: B Explanation: Adding a number and a string results in string concatenation, so the result is '22'. Question 7. What will the following code output? console.log(typeof true); A) "string" B) "number" C) "boolean" D) "object" Answer: C Explanation: The typeof operator returns "boolean" for boolean values.

Exam

B) def myFunc() {} C) func myFunc() {} D) define myFunc() {} Answer: A Explanation: Functions in JavaScript are defined using the function keyword. Question 10. What is the value of y after the following code executes? let y = 5; y += 3; A) 5 B) 8

Exam

C) 3

D) 53

Answer: B Explanation: y += 3 adds 3 to the value of y, resulting in 8. Question 11. Which operator is used to compare both value and type in JavaScript? A) == B) = C) === D) != Answer: C

Exam

A) if x = 5 then {} B) if (x == 5) {} C) if x == 5: D) if (x = 5) {} Answer: B Explanation: The correct syntax is if (condition) {}. Question 14. What will happen if you try to access a variable declared with let before its declaration? A) Returns undefined B) Throws a ReferenceError C) Returns null

Exam

D) Initializes with zero Answer: B Explanation: Variables declared with let are not hoisted and will cause a ReferenceError if accessed before declaration. Question 15. Which statement is used to exit a loop in JavaScript? A) exit B) break C) stop D) return Answer: B Explanation: The break statement exits a loop immediately.

Exam

A) Exits the loop B) Skips the current iteration and continues with the next C) Stops the program D) Restarts the loop Answer: B Explanation: continue skips the current iteration and moves to the next one. Question 18. How can you create an array in JavaScript? A) let arr = (1, 2, 3); B) let arr = [1, 2, 3]; C) let arr = {1, 2, 3};

Exam

D) let arr = <1, 2, 3>; Answer: B Explanation: Arrays are created using square brackets. Question 19. Which method can be used to convert a string to an integer in JavaScript? A) parseInt() B) toString() C) Number() D) Both A and C Answer: D Explanation: Both parseInt() and Number() can convert strings to numbers, though parseInt() parses up to the first non-digit character.

Exam

A) for (initialization; condition; increment) {} B) for initialization; condition; increment {} C) for (initialization, condition, increment) {} D) for {initialization; condition; increment;} Answer: A Explanation: The correct structure uses parentheses and semicolons. Question 22. Which of the following will NOT trigger a JavaScript event handler? A) onclick B) onmouseover C) onsubmit

Exam

D) onloadimg Answer: D Explanation: "onloadimg" is not a valid event; the correct event is "onload". Question 23. How do you access the first element of an array named fruits? A) fruits[1] B) fruits. C) fruits[0] D) fruits.first Answer: C Explanation: Arrays in JavaScript are zero-indexed.

Exam

B) function add(a, b): return a + b C) add(a, b) = a + b D) function add(a, b) => a + b; Answer: A Explanation: The correct JavaScript function uses curly braces and the return statement. Question 26. Which method adds a new element to the end of an array? A) unshift() B) push() C) pop() D) shift()

Exam

Answer: B Explanation: push() adds elements to the end of an array. Question 27. What will happen if you try to redeclare a variable with let in the same scope? A) It will overwrite the variable B) It will throw a SyntaxError C) It will ignore the redeclaration D) It will assign undefined Answer: B Explanation: Redeclaring a variable with let in the same scope is not allowed.