JavaScript - Updated for 2023-2024
(Exam Question & Answers )
var x = 10;
function mutliplyNumber(x) {
try {
const y = 15;
y = ( 2 * x);
return y;
}
catch {
return (3 * x);
}
finally {
return (4 * x);
}
}
x = multiplyNumber(x)
console.log(x)
What is the console output? - CORRECT ANSWERS
✔✔40
,JavaScript - Updated for 2023-2024
(Exam Question & Answers )
You are creating an application that requires a title and a
numbered list. Complete the code by selection the correct
option - CORRECT ANSWERS
✔✔document.getElementByID("title") textContent="Wish
List";
document.getElementByID("showList").value=text;
1. The form will submit to a script named contact
2. The form will submit only if the first name and last
name are entered
3. The form will not submit because it is missing the
submission method - CORRECT ANSWERS ✔✔True
True
False
Analyze the DOM Tree in the image. You need to insert an
img element that will be the first element in the body. -
CORRECT ANSWERS
✔✔document.appendChild("img")
src
querySelector("body")
, JavaScript - Updated for 2023-2024
(Exam Question & Answers )
append(newimgElement);
You need to create and populate a list of customers and
identify customers who placed orders in the last 3 years -
CORRECT ANSWERS ✔✔currentDate.getFullYear()
orderDate.getFullYear()
Your company offers a 10 percent discount if the day of
the week is Wednesday.
Complete the code by selecting the correct option from
each drop-down list. - CORRECT ANSWERS ✔✔switch
(day){
case "wednesday"
default:
When you choose spicy and click order, the warning fails
to display.
You need to solve the problem.
(Exam Question & Answers )
var x = 10;
function mutliplyNumber(x) {
try {
const y = 15;
y = ( 2 * x);
return y;
}
catch {
return (3 * x);
}
finally {
return (4 * x);
}
}
x = multiplyNumber(x)
console.log(x)
What is the console output? - CORRECT ANSWERS
✔✔40
,JavaScript - Updated for 2023-2024
(Exam Question & Answers )
You are creating an application that requires a title and a
numbered list. Complete the code by selection the correct
option - CORRECT ANSWERS
✔✔document.getElementByID("title") textContent="Wish
List";
document.getElementByID("showList").value=text;
1. The form will submit to a script named contact
2. The form will submit only if the first name and last
name are entered
3. The form will not submit because it is missing the
submission method - CORRECT ANSWERS ✔✔True
True
False
Analyze the DOM Tree in the image. You need to insert an
img element that will be the first element in the body. -
CORRECT ANSWERS
✔✔document.appendChild("img")
src
querySelector("body")
, JavaScript - Updated for 2023-2024
(Exam Question & Answers )
append(newimgElement);
You need to create and populate a list of customers and
identify customers who placed orders in the last 3 years -
CORRECT ANSWERS ✔✔currentDate.getFullYear()
orderDate.getFullYear()
Your company offers a 10 percent discount if the day of
the week is Wednesday.
Complete the code by selecting the correct option from
each drop-down list. - CORRECT ANSWERS ✔✔switch
(day){
case "wednesday"
default:
When you choose spicy and click order, the warning fails
to display.
You need to solve the problem.