Which line of code will generate an HTML list of numbers from 1 to 10? (One correct answer)
for($i = 1; $i <= 10; $i++) { echo '<li>' . $i . '</li>'; }
/////////////////////////////////////////////////////////
What is the correct way to check if a URL parameter named 'id' is set? (One correct answer)
if(isset($_GET['id'])) { ... }
/////////////////////////////////////////////////////////
How to send a form field named 'email' to a PHP script using the POST method? (One correct answer)
<form method='post'><input type='text' name='email'></form>
/////////////////////////////////////////////////////////
What is the purpose of the `execute` method in a PDO statement?
To execute a SQL query
/////////////////////////////////////////////////////////
How do you change the color of an element with the id 'demo' in JavaScript? (One correct answer)
document.getElementById('demo').style.color = 'red'
/////////////////////////////////////////////////////////
How do you set an event listener to run a function named 'myFunction' when the cursor enters an element with the id 'myElement'? (One correct answer)
document.getElementById('myElement').addEventListener('mouseenter', myFunction)
/////////////////////////////////////////////////////////
What is the purpose of the `.then` method in JavaScript?
To handle the result of an asynchronous operation
/////////////////////////////////////////////////////////