Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 5 quiz
10 questions · instant feedback after each answer.
1.
Who created JavaScript, and where?
Correct answer: A. Brendan Eich created JavaScript in just 10 days at Netscape Communications in 1995. It was first called LiveScript.
2.
JavaScript is an implementation of which standard?
Correct answer: B. ECMAScript defines the rules and guidelines; JavaScript is an implementation of ECMAScript.
3.
Which programming language runs natively in all major web browsers?
Correct answer: C. JavaScript is the only programming language that runs natively in all major browsers.
4.
Which runtime lets JavaScript run on the server?
Correct answer: A. Node.js runs JavaScript on the server, enabling full-stack development with a single language.
5.
Which keyword declares a block-scoped constant?
Correct answer: C. const declares a block-scoped value that cannot be reassigned. let is block-scoped but reassignable.
6.
A variable that is declared but not assigned has which value?
Correct answer: B. undefined means declared but not assigned. null is an intentional absence of a value.
7.
What does "5" + 5 evaluate to in JavaScript?
Correct answer: B. Type coercion: adding a string and a number converts the number to a string and concatenates, giving "55".
8.
Which statement sends a value back from a function?
Correct answer: B. The return statement sends the computed value back to the caller and stops execution.
9.
Which array method adds an element to the end of an array?
Correct answer: C. push() adds an element to the end of an array. pop() removes the last element.
10.
Which popup box lets the user type in a value?
Correct answer: C. prompt() shows a text field for the user to enter a value. confirm() returns true or false.
Your score
0/0