Monday, April 7, 2014

JavaScript

Questions
  1. What does the following expression evaluate to "var answer = (((3 * 90) === 270) || !(false && (!false)) || "bex".toUpperCase() === "BEX");"?
  2. Write a switch statement that uses 2 cases and a default.
  3. Create an object with 2 properties either using object literal notation or constructor notation.
  4. Access any property of the object "dog" using either bracket notation or dot notation.
    • var dog = {
        species: "greyhound",
        weight: 60,
        age: 4
      };
  5.  Make a method for an object, "rectangle", to change its height.
    • var rectangle = new Object();
      rectangle.height = 3;
      rectangle.width = 4;
Also, I tried to have the items in my to do list highlight when the cursor hovered over them but instead it highlighted the entire list. You can take a look at it but I will likely remove it later unless I can make it look better.

No comments:

Post a Comment