Complete the code to assign a null value to the variable.
$color: [1];In Sass, null is used to represent the absence of a value.
Complete the code to check if a variable is null using the correct Sass function.
@if [1]($value) == null { color: red; }
In Sass, type-of($value) == null is used to check if a value is null.
Fix the error in the code to properly assign a fallback color if $primary-color is null.
$final-color: if([1]($primary-color) == null, blue, $primary-color);
The if() function uses type-of($primary-color) == null to check if $primary-color is null.
Fill both blanks to create a map that excludes keys with null values.
$map: ( key1: value1, key2: [1], key3: value3 ); $filtered-map: map-remove($map, [2]);
Assign null to key2 and remove key2 from the map using map-remove().
Fill all three blanks to create a function that returns a default value if input is null.
@function default-if-null($input, $default) { @return if([1]($input) == null, [2], $input); } $result: default-if-null(null, [3]);
The function uses type-of($input) == null to check if $input is null, returns $default if true, otherwise returns $input. The example uses red as the default.