Challenge - 5 Problems
Sass Meta Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the output of
type-of for a list?Consider the Sass code:
What is the value of
$value: (1, 2, 3);
$result: type-of($value);
What is the value of
$result?SASS
$value: (1, 2, 3); $result: type-of($value);
Attempts:
2 left
💡 Hint
Think about how Sass groups multiple values separated by commas.
✗ Incorrect
The type-of function returns the type of the value passed. A value like (1, 2, 3) is a list in Sass, so the output is "list".
📝 Syntax
intermediate1:30remaining
What does
inspect output for a color?Given this Sass code:
What is the value of
$color: #ff0000;
$text: inspect($color);
What is the value of
$text?SASS
$color: #ff0000; $text: inspect($color);
Attempts:
2 left
💡 Hint
The
inspect function returns a string representation of the value as Sass sees it.✗ Incorrect
The inspect function returns the exact string representation of the value. For the hex color #ff0000, it returns the full hex string "#ff0000".
❓ selector
advanced1:30remaining
Which
type-of result matches a Sass map?What does
type-of return when called on a Sass map like (key: value)?SASS
$map: (key: value); $result: type-of($map);
Attempts:
2 left
💡 Hint
Maps are key-value pairs in Sass.
✗ Incorrect
A Sass map is a collection of key-value pairs. The type-of function returns "map" for such values.
❓ rendering
advanced2:00remaining
What does
inspect output for a nested list?Given this Sass code:
What is the value of
$nested: (1, (2, 3));
$text: inspect($nested);
What is the value of
$text?SASS
$nested: (1, (2, 3)); $text: inspect($nested);
Attempts:
2 left
💡 Hint
The
inspect function shows the exact structure including nested parentheses.✗ Incorrect
The inspect function returns a string that represents the value exactly as it is, including nested lists with parentheses.
❓ accessibility
expert1:30remaining
What error occurs when calling
type-of on an undefined variable?Consider this Sass code:
What error will Sass raise?
$result: type-of($undefined-variable);
What error will Sass raise?
SASS
$result: type-of($undefined-variable);Attempts:
2 left
💡 Hint
Using a variable that was never declared causes an error.
✗ Incorrect
Sass raises an undefined variable error when you try to use a variable that has not been declared or assigned a value.