How to get route parameter in JavaScript?
function getValueAtIndex(index){
var str = "http://www.sample.com/234/Fiddle/test"; //window.location.href;
return str.split("/")[index];
}
console.log(getValueAtIndex(3));
function getValueAtIndex(index){
var str = "http://www.sample.com/234/Fiddle/test"; //window.location.href;
return str.split("/")[index];
}
console.log(getValueAtIndex(3));