javascript - Can anyone tell me how to store 10 scores and display one score in a line using local storage? -


can tell me how store 10 scores , display 1 score in line using local storage?

var score = new array(10); var highscore = new array(); var len = score.length;  function f_score() {     (i = 0; < len; i++) {       (j = 0; j < len; j++) {         if (score[j] < score[j + 1]) {           temp = score[i];           score[i] = score[i + 1];           score[i + 1] = temp;         }         localstorage.setitem("highscore", score);         var highscore = localstorage.getitem("highscore");       }     }     document.write(highscore + "<br>") 


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -