0
0
SASSmarkup~10 mins

String types and concatenation in SASS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a string variable named $greeting with the value Hello.

SASS
$greeting: [1];
Drag options to blanks, or click blank then click option'
A"Hello"
BHello
CHello;
D'Hello'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to use quotes around the string value.
Using unquoted text which Sass treats as identifiers.
2fill in blank
medium

Complete the code to concatenate two strings $first and $second into $full.

SASS
$full: $first [1] $second;
Drag options to blanks, or click blank then click option'
A+
Bconcat
C+=
Attempts:
3 left
💡 Hint
Common Mistakes
Using concat which is not a Sass operator.
Using += which is not valid in Sass.
3fill in blank
hard

Fix the error in the code to concatenate $name and $title with a space between.

SASS
$label: $name [1] " " [1] $title;
Drag options to blanks, or click blank then click option'
A,
B+
C&
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas which separate arguments but do not concatenate.
Using & or - which are not string concatenation operators.
4fill in blank
hard

Fill both blanks to create a string map where keys are names and values are titles concatenated with a colon and space.

SASS
$people: ("Alice": $alice[1] ": " [2] $title-alice, "Bob": $bob[1] ": " [2] $title-bob);
Drag options to blanks, or click blank then click option'
A+
B,
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas which separate items but do not concatenate strings.
Using minus or other operators that cause errors.
5fill in blank
hard

Fill all three blanks to create a nested map with concatenated string keys and values.

SASS
$data: ("user-"[1]: ("name": $user[2] " " [3] $lastname));
Drag options to blanks, or click blank then click option'
A+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using minus or other invalid operators.
Forgetting to concatenate the space between first and last names.