Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a new sticky note in FigJam.
Figma
figma.currentPage.appendChild(figma.create[1]()) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using createRectangle instead of createStickyNote
Trying to create Text instead of StickyNote
✗ Incorrect
Use StickyNote to add a sticky note in FigJam.
2fill in blank
mediumComplete the code to set the text content of a sticky note.
Figma
const note = figma.createStickyNote(); note.[1] = 'Brainstorm ideas here';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'text' or 'content' which are not valid properties
Trying to set 'value' instead of 'characters'
✗ Incorrect
The characters property sets the text inside a sticky note.
3fill in blank
hardFix the error in the code to add a sticky note to the current page.
Figma
const sticky = figma.createStickyNote(); figma.currentPage.[1](sticky); Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-existent methods like addChild
Trying to call insertChild which is not valid
✗ Incorrect
The correct method to add a node to the page is appendChild.
4fill in blank
hardFill both blanks to create a sticky note and set its color.
Figma
const note = figma.[1](); note.[2] = {type: 'SOLID', color: {r: 1, g: 0.92, b: 0.23}};
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using createRectangle instead of createStickyNote
Trying to set fillStyleId instead of backgroundColor
✗ Incorrect
Create a sticky note with createStickyNote() and set its color using the backgroundColor property.
5fill in blank
hardFill all three blanks to create a sticky note, set its text, and add it to the page.
Figma
const note = figma.[1](); note.[2] = 'Ideas'; figma.currentPage.[3](note);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using createText instead of createStickyNote
Setting text with wrong property
Using addChild instead of appendChild
✗ Incorrect
Create a sticky note with createStickyNote(), set its text with characters, and add it to the page with appendChild.