Export SVG file from p5.js?

Hi all -
I am also a new Processing user, trying to get SVG exported from p5.js and finding it confusing.

I copied the code from @svan, pasted it in the online editor, and executed it. It created a download of a myImage.png (even though the specification in the code was for an svg) - and I got a bunch of errors in the console (duplicated below.)

I have managed to export a functional SVG from the Java version of Processing - but struggling with p5.js. Thanks for any help or insight.

🌸 p5.js says: [sketch.js, line 4] It seems that you may have accidentally written "SVG".
You may have meant one of the following: 
▶️ save() (http://p5js.org/reference/#/p5/save)
▶️ set() (http://p5js.org/reference/#/p5/set)
▶️ log() (http://p5js.org/reference/#/p5/log)
▶️ mag() (http://p5js.org/reference/#/p5/mag)
▶️ sin() (http://p5js.org/reference/#/p5/sin)
▶️ str() (http://p5js.org/reference/#/p5/str)
▶️ sq() (http://p5js.org/reference/#/p5/sq) 
ReferenceError: SVG is not defined
Error: [object Arguments]is not a valid color representation.

🌸 p5.js says: [p5.js, line 64684] color() was expecting Number for the first parameter, received an empty variable instead. If not intentional, this is often a problem with scope.

+ More info: https://p5js.org/examples/data-variable-scope.html (http://p5js.org/reference/#/p5/color) 

🌸 p5.js says: [sketch.js, line 23] An error with message "[object Arguments]is not a valid color representation." occurred inside the p5js library when background was called. If not stated otherwise, it might be an issue with the arguments passed to background. (http://p5js.org/reference/#/p5/background) 
saved svg 
Error: [object Arguments]is not a valid color representation.

🌸 p5.js says: [sketch.js, line 23] An error with message "[object Arguments]is not a valid color representation." occurred inside the p5js library when background was called. If not stated otherwise, it might be an issue with the arguments passed to background. (http://p5js.org/reference/#/p5/background)