JS Built-ins
← URL18 / 20
URLbeginner

URL.canParse() β€” relative URL with base

πŸ“– Usage Example
URL.revokeObjectURL(blobUrl)  // releases the blob from memory

URL.revokeObjectURL() frees the memory associated with a blob URL when no longer needed.

URL.canParse() β€” relative + base

URL.canParse(relative, base) returns true when the relative path can be resolved against the base.

Challenge: Verify URL.canParse('/path', 'https://example.com') returns true.

πŸ’‘ Hints (1)
  • β€’ The second argument to URL.canParse() is the base URL