0
0
SASSmarkup~5 mins

sass:map module - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the sass:map module used for?
The sass:map module provides functions to work with maps in Sass, like adding, removing, or getting values by keys.
Click to reveal answer
beginner
How do you get a value from a Sass map?
Use map.get($map, $key) to retrieve the value for a specific key in a map.
Click to reveal answer
beginner
What does map.has-key($map, $key) do?
It checks if the map contains the given key and returns true or false.
Click to reveal answer
intermediate
How can you add or update a key-value pair in a Sass map?
Use map.set($map, $key, $value) to add a new pair or update an existing key's value.
Click to reveal answer
beginner
What happens if you try to get a key that does not exist in a Sass map?
The map.get function returns null if the key is not found in the map.
Click to reveal answer
Which function checks if a key exists in a Sass map?
Amap.has-key()
Bmap.get()
Cmap.set()
Dmap.remove()
How do you add a new key-value pair to a Sass map?
Amap.push()
Bmap.add()
Cmap.set()
Dmap.insert()
What does map.get($map, $key) return if the key is missing?
A0
BAn empty string
CAn error
Dnull
Which module must you import to use Sass map functions?
Asass:list
Bsass:map
Csass:string
Dsass:color
How do you remove a key from a Sass map?
Amap.remove()
Bmap.unset()
Cmap.delete()
Dmap.remove-key()
Explain how to check if a key exists in a Sass map and retrieve its value safely.
Think about first checking the key, then getting the value.
You got /3 concepts.
    Describe how to add a new key-value pair to a Sass map and update an existing key's value.
    Remember Sass maps are immutable, so you get a new map back.
    You got /3 concepts.