title: why dont work insertAfter function in javascript
body: <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> but insertbefore work
  
  var a=document.querySelector("#div");
  
  var y=document.createElement('p');
  y.innerText='yazilarucun';
  
  
  var c=document.querySelector(".p");
  a.insertAfter(y,c);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;div id='div'&gt;yazi
    &lt;p class='p'&gt;p etiketi&lt;/p&gt;
    &lt;/div&gt; 
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>