- Are Strings mutable or immutable?
- What function can convert any value to a String?
- If you know a value is not null or undefined, what other method can you use to convert the value to a String?
- What characters surround a template literal?
- Define a single String that spans 2 lines and has “Hello” on the first line and “World!” on the second line.
- What is the syntax for an interpolated variable in a template literal?
- Suppose a variable named age has been declared and initialized with the value 10. Create a string using a template literal and interpolation that hold “Age: 10”.
- List 4 unary operators.
- What does unary plus do to a non-numeric variable?
- What does unary minus do to a non-numeric variable?
- What are the logical NOT, logical AND, and logical OR operators?
- What does it mean for an operator to be short-circuited?
- What are the 3 multiplicative operators?
- Show how you can print the square root of 25 to the console using the exponentiation operator.
- What are the 4 relational operators?
- How are strings compared?
- What is the value of (“Brick” < “alphabet”)?
- What is the difference between == and ===?
- Suppose num1 and num2 have been declared and initialized. Using the conditional operator, set a variable named min equal to num1 if num1 is smaller than num2, otherwise set min equal to num2.
- Using a while-loop, print the values in the interval [1,100] to the console.
- Using a for-loop, print the values in the interval [1,100] to the console.
- What does a for-in loop iterate over?
- what does a for-of loop iterator over?
- Declare a function named foo that takes a string str and a number k as arguments and prints str to the console k times.
- Write a statement that calls foo.
© 2020, Eric. All rights reserved.