The d3.closePath() function is used to close the current ongoing subpath and is almost the same as SVG's closepath command.
Syntax:
d3.closePath()
Parameters: It does not accept any parameters.
Return Value: It does not return any value.
Example 1:
Output:
👁 Image
Example 2: