Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to override the text property of an instance.
Figma
instance.text = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to use quotes around the string.
Assigning a variable name instead of a string.
✗ Incorrect
To override the text property, you must assign a string value enclosed in quotes.
2fill in blank
mediumComplete the code to override the fill color of an instance.
Figma
instance.fills = [{"type": "SOLID", "color": [1]] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using color names as strings instead of color objects.
Using arrays instead of objects for color.
✗ Incorrect
The fill color must be an object with r, g, b values between 0 and 1.
3fill in blank
hardFix the error in overriding the instance's opacity property.
Figma
instance.opacity = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using values greater than 1.
Using strings instead of numbers.
✗ Incorrect
Opacity must be a decimal between 0 and 1. 0.5 means 50% opacity.
4fill in blank
hardFill both blanks to override the width and height of an instance.
Figma
instance.resize([1], [2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings instead of numbers for dimensions.
Swapping width and height values.
✗ Incorrect
The resize method expects numeric values for width and height without quotes.
5fill in blank
hardFill all three blanks to override the instance's rotation, x, and y position.
Figma
instance.rotation = [1] instance.x = [2] instance.y = [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings instead of numbers.
Confusing rotation with position values.
✗ Incorrect
Rotation and position properties expect numeric values without quotes.