Cs521 Quiz 2 Fall 2024
Here are all the MCQs and their correct answers:
-
What does the jQuery "fadeOut" method do?
- Answer: It makes an HTML element invisible with a fading effect.
-
What is the file extension for a PHP file?
- Answer: .php
-
What is the purpose of the "catch" block in a try-catch statement?
- Answer: It handles the thrown exception by providing an alternative code path.
-
What is the scope of a variable declared inside a function in JavaScript?
- Answer: Local scope
-
What is jQuery?
- Answer: A JavaScript library for creating dynamic web pages and simplifying web development.
-
Which event type is triggered when a user clicks on an HTML element?
- Answer: click
-
What does the Document Object Model (DOM) represent in JavaScript?
- Answer: The structure of a web page as a hierarchical tree of objects.
-
What is the correct way to write an if statement in JavaScript?
- Answer: if (x == 10) { }
-
What is a server-side technology used for web development?
- Answer: PHP
-
Which loop in JavaScript is suitable for executing a block of code a specific number of times?
- Answer: for loop