title: How to get the last folder name and file name from a path using JavaScript?
body: <p>how can i get the last folder name and file name  from a full path,I need a solution for this.</p>
  
  <hr>
  
  <p>Example:</p>
  
  <pre><code>d:\folder1\folder2\assets\images\62f9a0f4-98b9-4dd0-8047-ed1a3cc306cf.png
  </code></pre>
  
  <p>In my case,I just need \images\62f9a0f4-98b9-4dd0-8047-ed1a3cc306cf.png from the path in Javascript.</p>