Front-end Web Development

Assignment for Week 7

  1. Create an HTML file. (Start with the HTML file in Assignment 1 as a basis. Feel free to skip the CSS creation/linking steps.)
  2. Create a JS file (a blank file with a .js extension).
  3. Add a <script> tag to the end of the <body> in the HTML file. Set its src attribute to the name of your JS file.
  4. In the JS file, declare a varlable called x.
  5. Assign the number 1000 as the value of x.
  6. Declare a variable called y and assign the number 234 as its value.
  7. Declare a variable called sum and assign it the sum of x and y (JavaScript should do this math, not you).
  8. Declare a variable called message and assign it a string that says, in sentence form, what the sum is (concatenation is necessary).
  9. Use the alert DOM function to show the message to the user.

Extra credit:


Solution