In: Computer Science
JavaScript
Create a welcome message on your webpage using three variables
At least two of the variables should be concatenated together
Use document.write to add a statement about what is your favorite past time?
Format the HTML document appropriately with a title, and the correct HTML structure to hold the JavaScript
Create an array to share what your favorite color is. The array must have at least three values and be called via the index value
Correctly link the JavaScript document to the HTML document via a relative link
Syntax is well formatted and easy to read Use of at least a JavaScript document and a HTML document
All files are correctly stored in a single folder, zipped, and prepared for upload to blackboard
if you have any doubts, please give me a comment...
<!DOCTYPE html>
<html>
<head>
<title>Welcome Page</title>
<script type="text/javascript" src="script.js"></script>
</head>
<body></body>
</html>
script.js
var str1 = "Hello";
var str2 = "World";
var str3 = "Welcome to "+str1 + str2;
document.write(str3+ ", what is your favorite past time?<br />");
var colors = ['red', 'green', 'blue', 'orange', 'black'];
document.write("Your Favorite color is: "+colors[2]);