0
0
SASSmarkup~20 mins

sass:meta module (type-of, inspect) - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Sass Meta Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the output of type-of for a list?
Consider the Sass code:
$value: (1, 2, 3);
$result: type-of($value);

What is the value of $result?
SASS
$value: (1, 2, 3);
$result: type-of($value);
A"list"
B"map"
C"string"
D"number"
Attempts:
2 left
💡 Hint
Think about how Sass groups multiple values separated by commas.
📝 Syntax
intermediate
1:30remaining
What does inspect output for a color?
Given this Sass code:
$color: #ff0000;
$text: inspect($color);

What is the value of $text?
SASS
$color: #ff0000;
$text: inspect($color);
A"#f00"
B"red"
C"rgb(255, 0, 0)"
D"#ff0000"
Attempts:
2 left
💡 Hint
The inspect function returns a string representation of the value as Sass sees it.
selector
advanced
1: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);
A"list"
B"map"
C"string"
D"null"
Attempts:
2 left
💡 Hint
Maps are key-value pairs in Sass.
rendering
advanced
2:00remaining
What does inspect output for a nested list?
Given this Sass code:
$nested: (1, (2, 3));
$text: inspect($nested);

What is the value of $text?
SASS
$nested: (1, (2, 3));
$text: inspect($nested);
A"(1, 2, (3))"
B"1, 2, 3"
C"(1, (2, 3))"
D"(1, 2, 3)"
Attempts:
2 left
💡 Hint
The inspect function shows the exact structure including nested parentheses.
accessibility
expert
1:30remaining
What error occurs when calling type-of on an undefined variable?
Consider this Sass code:
$result: type-of($undefined-variable);

What error will Sass raise?
SASS
$result: type-of($undefined-variable);
AUndefined variable error
BType error
CSyntax error
DNo error, returns "null"
Attempts:
2 left
💡 Hint
Using a variable that was never declared causes an error.