Recall & Review
beginner
What does the
type-of() function in the sass:meta module do?It tells you the kind of value you have, like if it's a number, string, color, list, map, or boolean.
Click to reveal answer
beginner
How does the
inspect() function help when working with Sass values?It turns any Sass value into a readable string so you can see exactly what's inside, which helps when debugging.
Click to reveal answer
beginner
Example: What will
type-of(#ff0000) return?It returns
"color" because #ff0000 is a color value.Click to reveal answer
intermediate
Why is using
inspect() better than just printing a value directly in Sass?Because
inspect() shows the full structure and details of complex values like lists or maps, making it easier to understand what you have.Click to reveal answer
intermediate
What kind of Sass values can
type-of() recognize?It can recognize:
string, number, color, boolean, list, map, null, and function.Click to reveal answer
What does
type-of(42) return in Sass?✗ Incorrect
42 is a number, so type-of() returns "number".Which function converts a Sass value into a readable string?
✗ Incorrect
inspect() turns any Sass value into a string you can read.What will
type-of((1, 2, 3)) return?✗ Incorrect
A comma-separated group like
(1, 2, 3) is a list in Sass.Why use
inspect() when debugging Sass code?✗ Incorrect
inspect() helps you see exactly what a value contains.Which of these is NOT a type recognized by
type-of()?✗ Incorrect
Sass does not have an 'array' type; it uses lists instead.
Explain how the
type-of() function helps you understand Sass values.Think about how knowing the type helps you decide what to do with a value.
You got /3 concepts.
Describe a situation where using
inspect() would make debugging Sass easier.Imagine you want to see what's inside a variable that holds many values.
You got /3 concepts.