Complete the code to get the type of the variable $color using type-of.
$color: #ff0000; $type: [1]($color);
inspect instead of type-of returns a string representation, not the type.length or unit which are unrelated here.The type-of function returns the type of a Sass value, such as color for $color.
Complete the code to print the value of $font-size using inspect.
$font-size: 1.5rem; @debug [1]($font-size);
type-of which returns the type, not the value.unit which returns the unit of a number.The inspect function returns a string that shows the value clearly, useful for debugging.
Fix the error in the code to correctly get the type of $margin.
$margin: 10px; $type: [1]$margin);
inspect without parentheses.The type-of function requires parentheses around its argument, so use type-of( $margin ).
Fill both blanks to create a debug message showing the type and value of $padding.
$padding: 2em; @debug "Type: #{ [1] }, Value: #{ [2] } ";
type-of and inspect.Use type-of($padding) to get the type and inspect($padding) to get the value as a string for debugging.
Fill all three blanks to create a map with keys as the type of each variable and values as their inspected values.
$color: #0000ff; $size: 12px; $flag: true; $result: ( [1]: [2], [3]: inspect($size), type-of($flag): inspect($flag) );
inspect for keys instead of type-of.The map keys are the types of variables using type-of, and the values are their inspected string forms using inspect.