Complete the code to create a text layer with the text 'Hello World'.
const text = figma.createText();
text.characters = [1];You need to assign the text characters as a string with quotes. Option C uses single quotes correctly.
Complete the code to set the font size of a text node to 24.
await figma.loadFontAsync({ family: 'Roboto', style: 'Regular' });
text.fontSize = [1];The fontSize property expects a number, so 24 without quotes is correct.
Fix the error in the code to change the text color to red.
text.fills = [[1]];The fills property expects an array of paint objects with type 'SOLID' and color as RGB values between 0 and 1.
Fill both blanks to create a text node and add it to the current page.
const text = [1]; figma.currentPage.[2](text);
Use figma.createText() to create a text node and appendChild() to add it to the page.
Fill all three blanks to create a text node, set its text, and set its font size.
const text = [1]; text.characters = [2]; text.fontSize = [3];
Create the text node with figma.createText(), set characters as a string, and fontSize as a number.