Recall & Review
beginner
What is a list in Sass?
A list in Sass is a collection of values separated by spaces or commas. It helps group multiple values together for easy use and manipulation.
Click to reveal answer
beginner
How do you create a comma-separated list in Sass?
You create a comma-separated list by writing values separated by commas, like:
$colors: red, green, blue;Click to reveal answer
intermediate
What does the
nth() function do in Sass lists?The
nth() function returns the value at a specific position in a list. For example, nth($list, 2) gives the second item.Click to reveal answer
intermediate
How can you add a value to the end of a Sass list?
Use the
append() function. For example, append($list, new-value) adds new-value to the end of $list. By default, it appends with a space separator unless a third argument specifies otherwise.Click to reveal answer
advanced
What is the difference between space-separated and comma-separated lists in Sass?
Space-separated lists use spaces between values and behave like multiple arguments. Comma-separated lists use commas and keep values grouped distinctly. Some functions treat them differently.
Click to reveal answer
How do you access the third item in a Sass list named
$my-list?✗ Incorrect
The
nth() function is used to get the item at a specific position in a Sass list.Which function adds a value to the end of a Sass list?
✗ Incorrect
The
append() function adds a new value to the end of a list in Sass.What separator does this list use?
$list: 10px 20px 30px;✗ Incorrect
Values separated by spaces form a space-separated list in Sass.
If you want to keep values grouped distinctly, which list separator should you use?
✗ Incorrect
Comma-separated lists keep values grouped distinctly in Sass.
What will
length(10px, 20px, 30px) return?✗ Incorrect
The
length() function requires a list variable, not separate arguments. Passing separate values causes an error.Explain how to create and access values in a Sass list.
Think about how you group items in a shopping list and how you pick one item by position.
You got /3 concepts.
Describe how to add a new value to an existing Sass list and why list separators matter.
Imagine adding a new ingredient to a recipe list and how you separate ingredients.
You got /3 concepts.