DEV Community

Jennifer Tieu
Jennifer Tieu

Posted on • Updated on

Self-Taught Developer Journal, Day 29: TOP JavaScript Fundamentals Part 2 - Practice and Knowledge Check

Today I completed The Odin Project JS Fundamentals Part 2 Knowledge Check Section after reviewing all of the materials.

Knowledge Check

  1. What are the eight data types in JavaScript? Numbers, BigInt, Strings, null, undefined, Boolean, Objects, Symbols
  2. Which data type is NOT primitive? Objects
  3. What is the relationship between null and undefined? The expression, null == undefined, returns true when using the loose equality operator, "==", but not for, "==="
  4. What is the difference between single, double, and backtick quotes for strings? Single and double both behave the same. Backtick quotes can format strings with variables and expressions.
  5. What is the term for embedding variables/expressions in a string? Template literals
  6. Which type of quote lets you embed variables/expressions in a string? Backticks
  7. How do you embed variables/expressions in a string? ${...}
  8. How do you escape characters in a string? Put a blackslash, "\", in front of a character
  9. What are methods? Actions performed on Objects
  10. What is the difference between slice/substring/substr? Slice extracts a part of a string and returns the extracted part in a new string. Substring is similar to slice, but can't use negatives indices Substr is similar to slice, but the second parameter specifies the length of the extracted part.
  11. What are the three logical operators and what do they stand for? && (AND), || (OR), ! (NOT)
  12. What are the comparison operators? Operators that compare values between operands
  13. What are truthy and falsy values? Values that return the boolean value true or false
  14. What are the falsy values in JavaScript? 0, empty string, null, NaN, and undefined
  15. What are conditionals? evaluates whether a statement/expression is true or false
  16. What is the syntax for an if/else conditional? Refer to end
  17. What is the syntax for a switch statement? Refer to end
  18. What is the syntax for a ternary operator? condition ? value1: value2;
  19. What is nesting? Putting a statement inside of another statement, therefore nesting them.

For Question 16:

if {
  ...
} else {
  ...
}
Enter fullscreen mode Exit fullscreen mode

For Question 17:

switch (condition) {
case a:
code block
break
default:
code block
}
Enter fullscreen mode Exit fullscreen mode




Resources

The Odin Project

Discussion (0)