JavaScript Simplified / Chapter 93 Exercises

  • Index of exercises
  • Email me

1

2

3

4

5

6

7

8

9

10

Congratulations. You've aced all the exercises for this chapter.


To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.


Are you ready to rate JavaScript Simplified? on Amazon?


Rate it on Amazon.

0,1,2,3,4,5,6,7,8,9

0

0

0

0

You can think of it as a unique, random big number stored in the computer's memory. It's a ______. symbol symbol
Fill in the blank to assign a symbol to something. const something = ___________; Symbol() Symbol\(\)
Fill in the blank. const password = Symbol();
const user307 = {
  email: "bramstoker@gmail.com",
  [________]: "xTwp&sp_"
};
password password
Fill in the blank. const password = Symbol();
const user307 = {
  email: "bramstoker@gmail.com",
  ________: "xTwp&sp_"
};
[password] \[password\]
Assign a symbol to a "constant variable." Make up the name of the variable. const patientNumber = Symbol(); const[a-z_$][a-zA-Z0-9_$]*=Symbol\(\);
Fill in the blank. const password = Symbol();
const user307 = {
  email: "bramstoker@gmail.com",
  [password]: "xTwp&sp_"
};
const nationality = Symbol();
user307___________ = "Irish";
[nationality] \[nationality\]
Given the following code, call the method. const password = Symbol();
const user307 = {
  email: "bramstoker@gmail.com",
  [password]: "xTwp&sp_"
};
const showPassword = Symbol();
user307[showPassword] = function() {
  console.log(this[password]);
}
user307[showPassword](); user307\[showPassword\]\(\);
A symbol has been assigned to the "constant variable" showPassword. Rewrite this line to correct the error. user307.showPassword = function() { user307[showPassword] = function() { user307\[showPassword\]=function\(\){
  1. Assign a symbol to a "constant variable."
  2. Create an object with one property using the variable.
  3. Display the value of the property in an alert.
  4. Wait a moment.
  5. If you've coded correctly, an alert will display the property value.
  6. Dismiss the alert by clicking OK.
  7. For help with this code, see Chapter 93 in the book.
  1. I've created an object. I've assigned the name of a method to a symbol.
  2. Using the name, code the method for the object. The method displays the value of the object's property in an alert.
  3. Call the method.
  4. Wait a moment.
  5. If you've coded correctly, an alert will display the property value.
  6. Dismiss the alert by clicking OK.
  7. For help with this code, see Chapter 93 in the book.