How to get the last element in JavaScript array?
Answers
Answered by
0
var linkElement = document.getElementById("BackButton");
var loc_array = document.location.href.split('/');
var newT = document.createTextNode(unescape(capWords(loc_array[loc_array.length-2])));
linkElement.appendChild(newT);
hope this answer is helpful
Similar questions
India Languages,
6 months ago
Hindi,
6 months ago
English,
6 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago
Math,
1 year ago
English,
1 year ago
Math,
1 year ago