title: Functions and Strings in JavaScript
body: <p>I'm just starting programming, I have this issue and I can't finish it. where to use <code>startsWith</code> inside the function?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function werewolfCheck(name) {
    if (name === str.startsWith('were')) {
      return 'It is a werewolf';
    } else {
      return 'Just a regular person';
    }
  }
  
  var werewolfCheck = name.str.startsWith('were');
  werewolfCheck('werebrian');</code></pre>
  </div>
  </div>
  </p>