What does this response-header builder print?

from Security response headers
Node 24 beginner 2 min

What does this response-header builder print?

JavaScript
function headers({ https }) {
  const result = {
    'X-Content-Type-Options': 'nosniff',
  };
  if (https) {
    result['Strict-Transport-Security'] = 'max-age=31536000';
  }
  return result;
}

console.log(Object.keys(headers({ https: false })).length);
console.log(Object.keys(headers({ https: true })).length);
Open in playground
Report an error