now for your questions
// Q.1. How to modify and make the scripts look better and readable ?
it could be better but i assume you did not get to the class leason yet which will help you alot and make reusable object so do not worry about that yet as i think you just got to the conditional statement
// Q.2. Whenever I enter a new Associative Array e.g staff8, I need to do extra four steps further, including Step 1 - adding new staff.dataUpload at the back in variable totoalNoOfDataUpload. Step 2 - call function staffChecking () by entering new argument e.g staffChecking(staff8),
// … Step 3 - Adding new staff.dataUpload at the back in variable highestScore. Step 4 - call function getHighestScoreOfStaff () by entering new argument e.g getHighestScoreOfStaff(staff8). Would it be able to shorten the steps to make it run efficiently ?
this will be fixed after loop leason and also class will make it even better and create array that hold all those object and use the loop to iterate for all object so no matter how many object the loop will run for all of them
// Q.3 For the [ if command ] I use, is there any better command would be better than this to run the program ?
you can use Ternary statement for the highest score thing like following
( staff1.dataUpload === highestScore ) ? console.log(staff1) : ( staff2.dataUpload === highestScore ) ? console.log(staff2) : ( staff3.dataUpload === highestScore ) ? console.log(staff3) : ( staff4.dataUpload === highestScore ) ? console.log(staff4) : ( staff5.dataUpload === highestScore ) ? console.log(staff5) : ( staff6.dataUpload === highestScore ) ? console.log(staff6) : console.log(staff7) ;
just note i used the console log here of course you can use the alert as you did in your function
hope that help and happy trip with your lessons and have a nice day