I wanted to know how I can return an array of names currently on the leaderboard.
This is the code I have:
This could be done with react very easy, but in this case all you need is some jquery!:
var array = [1, 2, 4, 5, ,6 ,7 ,8] /// here you can update with own elements
$(document).ready(function() {
for (var i = 0; i < array.length; i++) {
$("ol").append("- " + array[i] + "
")
}
})
Demo here: http://jsfiddle.net/n5phf/405/