Advertisement
Spocoman

Annual Salary

Sep 23rd, 2023
1,050
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AnnualSalary(input) {
  2.     let experience = Number(input[0]);
  3.     let specialty = input[1];
  4.  
  5.     let salary = 0;
  6.  
  7.     if (specialty == "C# Developer") {
  8.         salary = 5400;
  9.     } else if (specialty == "Java Developer") {
  10.         salary = 5700;
  11.     } else if (specialty == "Front-End Web Developer") {
  12.         salary = 4100;
  13.     } else if (specialty == "UX / UI Designer") {
  14.         salary = 3100;
  15.     } else if (specialty == "Game Designer") {
  16.         salary = 3600;
  17.     }
  18.  
  19.     if (experience <= 5) {
  20.         salary -= salary * 0.658;
  21.     }
  22.  
  23.     console.log(`Total earned money: ${(salary * 12).toFixed(2)} BGN`);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement