const u = new URL('https://example.com/?q=1')
u.toJSON() === u.href // β truetoJSON() returns the same string as href, used during JSON.stringify().
Changing a URL property (e.g. pathname) updates the serialized URL returned by toString().
Challenge: Change pathname and verify toString() reflects the change.