JSFiddle - React, Tailwind, and code Playground

by Chintan Upadhayay

HTML

<a href="#one" class="hash">One</a> 
<div>
    <p>some text</p>
</div>
<a href="#two" class="hash">Two</a> 
<div>
    <p>some text</p>
</div>
<a href="#three" class="hash">Three</a> 
<div>
    <p>some text</p>
</div>

CSS

div {
    height: 400px;
}

JavaScript

var s="How to use AD FS activity report to migrate an application | Azure Active Directory|5736";
/* var lastIndex = s.lastIndexOf("|") */
//console.log(lastIndex);
/* var s1 = s.substring(0, lastIndex); //after this s1="Text1, Text2, Text" */
//console.log(s1);
/* var s2 = s.substring(lastIndex + 1); */ 

//var data = s.substring(s.lastIndexOf("|") + 1, s.length);
/* console.log(s2); */

/* var s="Text1, Text2, Text,true"; */
var lastIndex = s.lastIndexOf("|")
console.log(lastIndex);
var s1 = s.substring(0, lastIndex); //after this s1="Text1, Text2, Text"
console.log(s1);
var s2 = s.substring(lastIndex + 1); //after this s2="true"
console.log(s2);