Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Programming Languages
Javascript
Building and listing top scorers from
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="City1971, post: 5169811, member: 89883"] I am trying to build a table of players goalscoring records. I have five arrays: player, total_goals, goals_1st_half, goals_2nd_half and sorted_goals. [URL unfurl="true"]https://jsfiddle.net/a4poster/kpnmc41g/3/[/URL] I have created a fiddle with the base arrays in: Fiddle with arrays in and outcomes I don't wish to have the first array sorted - that should always remain as 0 for each array. A couple of players have scored the same number of goals but the player who scored the most in the first-half takes precedence - if they can't be separated it is the lowest index number. I can sort the array Ok but cannot eliminate, push the zero and work out the arrays where the player has the same goals. [/QUOTE]
Verification
Post reply
Forums
Programming Languages
Javascript
Building and listing top scorers from
Top