doc: add URL.format() example
This PR adds an example use of the URL.format()
method.
Resolves https://github.com/nodejs/node/issues/18887
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
-
doc -
url