📝 CSE326 Unit-5 MCQ Test

⏱️
30:00

⚡ Each correct answer carries +1 mark and each wrong answer carries -0.25 negative marking.

Question 1

What is a function in JavaScript?

Question 2

Which keyword is used to define a function in JavaScript?

Question 3

How do you pass parameters to a JavaScript function?

Question 4

Which statement is used to return a value from a function?

Question 5

Which type of function does not have a name?

Question 6

Which JavaScript event is triggered when a user submits a form?

Question 7

Which event occurs when a key is pressed on the keyboard?

Question 8

Which event is triggered when the mouse pointer moves over an element?

Question 9

Which JavaScript event occurs when an input field loses focus?

Question 10

What is form validation?

Question 11

Which attribute is used to make a form field mandatory in HTML5?

Question 12

Which JavaScript method is used to prevent form submission?

Question 13

Which JavaScript event is used for mouse click?

Question 14

Which function is used to display a message box?

Question 15

Which function displays a dialog box with OK and Cancel buttons?

Question 16

Which function accepts user input as text?

Question 17

Which event is triggered when a user changes the value of an input field?

Question 18

Which JavaScript keyword is used to declare a block-scoped variable?

Question 19

What will be the output of isNaN("10")?

Question 20

Which JavaScript method converts a string into an integer?

Question 21

Which keyword is used to stop the execution of a function and return control to the caller?

Question 22

What is the purpose of function arguments in JavaScript?

Question 23

Which event is triggered when a key is released on the keyboard?

Question 24

Which event occurs when the mouse button is pressed over an element?

Question 25

Which HTML attribute specifies a regular expression that an input field's value must match?

Question 26

Which JavaScript method is used to access form elements?

Question 27

Which JavaScript event is triggered when the mouse pointer leaves an element?

Question 28

What does the arguments object contain in a JavaScript function?

Question 29

Which JavaScript function checks whether a value is a number?

Question 30

Which JavaScript event is triggered when the user types in an input field?