New URL(weblinks) ... not supported?

I tried to use “new URL(weblinks)” in a calculation field. I keep getting this error:

“Script reference error: URL is not defined”

Shouldn’t this be plain JavaScript? Is it not supported?
I made sure, the first weblink is read from the weblinks array field correctly as a string. But that seems not to be the issue.