Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Interactivity</title>
</head>
<body>
<script>
// Prompt to ask the user what code library they prefer
let library = prompt("What code library would you prefer - Vue, React, or jQuery?");
// Display the user's choice
if (library.toLowerCase() == "vue") {
alert("You chose Vue");
}
else if (library.toLowerCase() == "react") {
alert("You chose React");
}
else if (library.toLowerCase() == "jquery") {
alert("You chose jQuery");
}
else {
alert("Invalid choice");
}
// Prompt to ask about the language created for web interactivity
let language = prompt("What language was created to add interactivity to the Web?");
// Display the user's input
if (language.toLowerCase() == "javascript") {
alert("Correct! JavaScript was created to add interactivity to the Web.");
} else {
alert("You entered: " + language);
}
</script>
</body>
</html>