{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-06T21:25:13-04:00", "answer_date": "2024-09-06 21:25:13", "is_docs_available": null, "is_excel_available": null, "is_pdf_available": null, "count_file_available": 0, "main_page": "student_question_view", "question_id": "9389869", "url": "\/study-help\/questions\/javascript-hello-i-would-like-some-help-there-are-the-9389869", "question_creation_date_js": "2024-09-06T21:25:13-04:00", "question_creation_date": "Sep 06, 2024 09:25 PM", "meta_title": "[Solved] JAVASCRIPT Hello, I would like some help | SolutionInn", "meta_description": "Answer of - JAVASCRIPT Hello, I would like some help there are the directions: You have 5 employees. Write a program that asks for | SolutionInn", "meta_keywords": "javascript,hello,help,directions,5,employees,write,program,asks,employee,total,sales", "question_title_h1": "JAVASCRIPT Hello, I would like some help there are the directions: You have 5 employees. Write a program that asks for the employee name and", "question_title": "JAVASCRIPT Hello, I would like some help there are the directions: You", "question_title_for_js_snippet": "JAVASCRIPT Hello, I would like some help there are the directions You have 5 employees Write a program that asks for the employee name and their total sales for the month Calculate their commission which is10 of the total sales They will receive a bonus based on their total sales Sales Bonus 0 1000 0 1001 10000 100 Over 10000 1000 Display each of the employees commission and bonus After all 5 employees have been entered, display the total sales, total commission, and total bonus for all employees Here is my code so far Name Sales Commission Bonus Total Sales Total Commission Total Bonuses var question 0 var nameList salesList totalList while (question 5) var name prompt( Enter Employee Name ) var sales Number(prompt( Enter Number of Sales )) nameList push(name) salesList push(sales) question var table document getElementById( table ) var htmlStr for (let i 0 i 3 i ) htmlStr htmlStr $ nameList i htmlStr $ saleList i htmlStr $ totalList i htmlStr var total salesList reduce((a, b) a b, 0) var bonus 0 if (total 1000 total 10000) bonus 100 else if(total 10001) bonus 1000 var table document getElementById( table ) var htmlStr for (let i 0 i 3 i ) htmlStr htmlStr $ nameList i htmlStr $ saleList i htmlStr $ quanList i htmlStr $ (costList i ) toFixed(2) htmlStr thank you", "question_description": "

JAVASCRIPT<\/p>

Hello, I would like some help<\/p>

there are the directions:<\/p>

You have 5 employees. Write a program that asks for the employee name and their total sales for the month. Calculate their commission which is10% of the total sales. They will receive a bonus based on their total sales.<\/p>

Sales<\/p> <\/td>

Bonus<\/p> <\/td> <\/tr>

0 - 1000<\/p> <\/td>

0<\/p> <\/td> <\/tr>

1001 - 10000<\/p> <\/td>

100<\/p> <\/td> <\/tr>

Over 10000<\/p> <\/td>

1000<\/p> <\/td> <\/tr> <\/tbody> <\/table>

Display each of the employees commission and bonus. After all 5 employees have been entered, display the total sales, total commission, and total bonus for all employees. <\/p>

Here is my code so far:<\/p>

<\/head> <\/tbody>
Name<\/td> Sales<\/td> Commission<\/td> Bonus<\/td> <\/tr> <\/thead>
Total Sales :<\/td> <\/td> <\/tr>
Total Commission :<\/td> <\/td> <\/tr>
Total Bonuses :<\/td> <\/td> <\/tr> <\/tfoot> <\/table>