Complete the code to create a polygon shape with 5 sides.
const polygon = figma.createPolygon();
polygon.pointCount = [1];The pointCount property sets the number of sides for the polygon. For a pentagon, use 5.
Complete the code to create a star shape with 7 points.
const star = figma.createStar();
star.pointCount = [1];The pointCount property sets the number of points on the star. For a 7-point star, use 7.
Fix the error in the code to set the star's inner radius to 30.
const star = figma.createStar();
star.innerRadius = [1];The innerRadius property expects a number, not a string or function call.
Fill both blanks to create a polygon with 8 sides and set its corner radius to 10.
const polygon = figma.createPolygon(); polygon.pointCount = [1]; polygon.cornerRadius = [2];
Set pointCount to 8 for an octagon and cornerRadius to 10 for rounded corners.
Fill all three blanks to create a star with 6 points, set its inner radius to 20, and outer radius to 50.
const star = figma.createStar(); star.pointCount = [1]; star.innerRadius = [2]; star.outerRadius = [3];
Set pointCount to 6 for six points, innerRadius to 20, and outerRadius to 50 for star size.