Recall & Review
beginner
What does the Sass
to-upper-case() function do?It converts all letters in a string to uppercase. For example,
to-upper-case('hello') returns 'HELLO'.Click to reveal answer
beginner
How do you find the length of a string in Sass?
Use the
str-length() function. It returns the number of characters in the string, including spaces.Click to reveal answer
intermediate
What is the purpose of the
str-insert() function in Sass?It inserts one string into another at a specified index. For example,
str-insert('hello', 'y', 2) returns 'hyello'.Click to reveal answer
intermediate
Explain what
str-slice() does in Sass.It extracts a part of a string between two positions. For example,
str-slice('hello', 2, 4) returns 'ell'.Click to reveal answer
beginner
How does
to-lower-case() differ from to-upper-case() in Sass?to-lower-case() converts all letters in a string to lowercase, while to-upper-case() converts them to uppercase.Click to reveal answer
Which Sass function returns the number of characters in a string?
✗ Incorrect
str-length() counts characters in a string, including spaces.
What does
str-insert('cat', 's', 4) return?✗ Incorrect
Inserts 's' at position 4 (end), so result is 'cats'.
Which function changes all letters in a string to uppercase?
✗ Incorrect
to-upper-case() converts letters to uppercase.
What does
str-slice('sass', 2, 3) return?✗ Incorrect
Extracts characters from position 2 to 3, which is 'as'.
Which function would you use to convert 'HELLO' to 'hello' in Sass?
✗ Incorrect
to-lower-case() converts all letters to lowercase.
Describe how to change a string to uppercase and lowercase in Sass using built-in functions.
Think about functions that change letter cases.
You got /3 concepts.
Explain how to extract a part of a string and how to insert a string inside another string in Sass.
Focus on functions that manipulate parts of strings.
You got /4 concepts.