What does this exact origin comparison print?

from CORS
Node 24 beginner 2 min

What does this exact origin comparison print?

JavaScript
const base = new URL('https://app.example.com/a');
const targets = [
  'https://app.example.com/b',
  'https://api.example.com/a',
  'https://app.example.com:8443/a',
];
for (const value of targets) {
  console.log(new URL(value).origin === base.origin);
}
Open in playground
Report an error