What can .attr attach to?

I was in the code playground with the snippet “gradient” and was looking to attach .attr to the end of drawbox(…) but it was not available among the keys. To what can .attr be attached and what can’t it be attached to?

Hey there, attr is a function from the D3 library used to modify the attributes of SVG shapes. To use the .attr key in the code playground on mobile, tap the button that says “Enable SVG Shapes”.

Unfortunately, this will erase the starter code. Because this snippet was made without D3, I don’t believe you’ll be able to use any D3 code with it.