title: Why are Strings JavaScript Primitives?
body: <p>I'm not a JavaScript newbie, but I was reading MDN page on primitive data types and it caught my attention the following line:</p>
  
  <blockquote>
    <p>A primitive (primitive value, primitive data type) is data that is not an object and <strong>has no methods</strong>. In JavaScript, there are 6 primitive data types: string, number, boolean, null, undefined, symbol (new in ECMAScript 2015).</p>
  </blockquote>
  
  <p>Source: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Glossary/Primitive</a></p>
  
  <p>If primitives have no methods, then why is it possible to do this in JavaScript:</p>
  
  <p><code>'HELLO WORLD'.toLowerCase() // result: hello world</code></p>
  
  <p>Why isn't that invalid? Shouldn't that throw an "Uncaught SyntaxError: Invalid or unexpected token" just as the following statement does:</p>
  
  <p><code>2.toString()</code></p>