WorksheetsMERN STACK QUIZ
Total questions: 81
Worksheet time: 41mins
Each question has four choices (A, B, C, D); choose one. What does HTML stand for?
Hyper Trainer Marking Language
Hyper Text Markup Language
Hyper Text Marketing Language
Hyper Tool Markup Language
Each question has four choices (A, B, C, D); choose one. What is the correct HTML element for inserting a line break?
Each question has four choices (A, B, C, D); choose one. Which attribute is used to provide an alternate text for an image?
title
alt
src
href
Each question has four choices (A, B, C, D); choose one. What is the largest heading tag in HTML?
Each question has four choices (A, B, C, D); choose one. Which tag is used to create an unordered list?
Each question has four choices (A, B, C, D); choose one. What does CSS stand for?
Computer Style Sheets
Creative Style Sheets
Cascading Style Sheets
Colorful Style Sheets
Each question has four choices (A, B, C, D); choose one. Which property is used to change the background color in CSS?
color
bgcolor
background-color
backgroundStyle
Each question has four choices (A, B, C, D); choose one. How do you select an element with id="demo" in CSS?
.demo
#demo
demo
*demo
Each question has four choices (A, B, C, D); choose one. Which CSS property controls the text size?
font-style
text-size
font-size
text-style
Each question has four choices (A, B, C, D); choose one. How do you make all
elements bold in CSS?
p {font-weight: bold;}
p {text-style: bold;}
p {font: bold;}
p {style: bold;}
Each question has four choices (A, B, C, D); choose one. Which is the correct CSS syntax to make all
elements red?
h1 {color: red;}
h1:color=red;
h1 {text-color: red;}
h1 = red;
Each question has four choices (A, B, C, D); choose one. What is the correct way to comment in CSS?
// comment
/* comment */
# comment
Each question has four choices (A, B, C, D); choose one. Which HTML tag is used to define an internal style sheet?
Each question has four choices (A, B, C, D); choose one. How do you write "Hello World" in an alert box in JavaScript?
msg("Hello World");
alertBox("Hello World");
alert("Hello World");
msgBox("Hello World");
Each question has four choices (A, B, C, D); choose one. Which symbol is used for single-line comments in JavaScript?
//
#
/*
Each question has four choices (A, B, C, D); choose one. How do you declare a JavaScript variable?
var myVar;
variable myVar;
v myVar;
declare myVar;
Each question has four choices (A, B, C, D); choose one. What is the correct syntax for referring to an external script called "app.js"?
Each question has four choices (A, B, C, D); choose one. How do you write an IF statement in JavaScript?
if i = 5 then
if (i == 5)
if i == 5 then
if i = 5
Each question has four choices (A, B, C, D); choose one. Which operator is used to assign a value to a variable?
*
-
=
What is the output of: console.log(typeof 42);
"string"
"number"
"boolean"
"object"
Which method adds a new element to the end of an array?
push()
pop()
shift()
unshift()
How do you create a function in JavaScript?
function myFunction() {}
create myFunction() {}
function:myFunction() {}
def myFunction() {}
What is the correct way to write a JavaScript array?
var colors = "red", "green", "blue"
var colors = (1:"red", 2:"green", 3:"blue")
var colors = ["red", "green", "blue"]
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
Which event occurs when the user clicks on an HTML element?
onmouseover
onchange
onclick
onmouseclick
How do you round the number 7.25 to the nearest integer in JavaScript?
Math.rnd(7.25)
round(7.25)
Math.round(7.25)
rnd(7.25)
Which method removes the last element from an array?
pop()
push()
shift()
unshift()
How do you access the first element of an array named fruits?
fruits[0]
fruits(0)
fruits{0}
fruits.0
What is the correct way to write a for loop in JavaScript?
for (i = 0; i < 5; i++)
for i = 1 to 5
for (i <= 5; i++)
for (i = 0; i <= 5)
Which keyword is used to exit a loop in JavaScript?
stop
exit
break
return
What does the DOM stand for?
Document Object Model
Data Object Model
Document Oriented Model
Data Oriented Model
Which method is used to select an element by its ID in JavaScript?
getElementById()
getElementByClass()
selectById()
querySelectorAll()
What is the default value of a variable declared with var but not initialized?
null
0
undefined
""
Which HTML tag is used to display a table?
c) d) 55. How do you make a numbered list in HTML? a) b) c) d) 56. Which CSS property is used to set the height of an element? a) height b) width c) size d) element-height 57. What is the correct way to write a function that returns the product of two numbers in JavaScript? a) function multiply(a, b) { return a * b; } b) function multiply(a, b) { a * b; } c) function multiply(a, b) return a * b; d) function multiply(a, b) { return a + b; } 58. Which HTML tag is used to define emphasized text? a) b) c) d) 59. How do you select all elements with class="test" in CSS? a) .test b) #test c) test d) *test 60. Which property is used to change the left padding of an element in CSS? a) padding-left b) margin-left c) left-padding d) padding 61. What is the correct way to write a multi-line comment in JavaScript? a) // This is a comment b) /* This is a multi-line comment */ c) d) /** This is a doc comment */ 62. Which HTML tag is used to define a list item? a) b) c) d) 63. What is the correct syntax for a ternary operator in JavaScript? a) condition ? expr1 : expr2 b) condition then expr1 else expr2 c) if (condition) expr1 else expr2 d) condition ? expr1 then expr2 64. Which CSS property is used to make the text bold? a) font-weight b) font-style c) font-bold d) text-weight 65. What is the correct HTML for making a checkbox? a) b) c) d) 66. Which method is used to remove whitespace from both ends of a string in JavaScript? a) strip() b) trim() c) clean() d) remove() 67. What is the correct way to add a comment in HTML? a) // comment b) c) /* comment */ d) # comment 68. Which HTML tag is used to define a navigation link section? a) b) c) d) 69. How do you make a text input field in HTML? a) b) c) d) 70. Which CSS property is used to set the width of an element? a) width b) height c) size d) element-width 71. What is the correct way to write an arrow function in JavaScript? a) (a, b) => a + b b) (a, b) -> a + b c) (a, b) := a + b d) (a, b) = a + b 72. Which HTML tag is used to define a division or a section? a) b) c) d) 73. What is the correct way to import a React component? a) import MyComponent from './MyComponent'; b) require MyComponent from './MyComponent'; c) include MyComponent from './MyComponent'; d) load MyComponent from './MyComponent'; 74. Which hook is used to perform side effects in React? a) useEffect b) useState c) useContext d) useReducer 75. What is the default port for a React development server (Vite or Create React App)? a) 3000 b) 5000 c) 27017 d) 8080 76. Which method is used to update state in a React functional component? a) setState b) useState c) updateState d) changeState 77. What is the correct way to render a list in React? a) Using map() to return JSX elements b) Using forEach() to return JSX elements c) Using for loop in JSX d) Using while loop in JSX 78. Which of the following is NOT a valid React hook? a) useState b) useEffect c) useClass d) useContext 79. What is the correct way to start a Node.js server? a) node server.js b) npm start server.js c) start server.js d) run server.js 80. Which method is used to connect to a MongoDB database in Node.js? a) MongoClient.connect() b) mongoose.connect() c) db.connect() d) mongo.connect() 81. What is the default port for MongoDB? a) 3306 b) 5432 c) 27017 100 % Similar Resources on Wayground85 questions UTS My SQL Worksheet • University 78 questions AI For Business Worksheet • University 86 questions HTML Quiz Worksheet • University 78 questions Câu hỏi phỏng vấn và yêu cầu hệ thống Worksheet • University 76 questions Chương 3_ Bộ xử lí trung tâm và kiến trúc tập lập (76) Worksheet • University 79 questions Focus of the Course: Object-Oriented Software Development Worksheet • University 82 questions QUIZ SPSS Worksheet • University 82 questions ITE 331 Final Exam Worksheet • University |

