Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <body>
  2.  
  3. <h1>Yearly Buttetin Board Announcements!</h1>
  4. <h2 id='win'></h2>
  5. <h3 id='here'></h3>
  6. <h4 id='notHere'></h4>
  7.  
  8. <script src='app.js'></script>
  9. </body>
  10.  
  11. for (i = 0; i < myEmployees.length; i++){
  12. const employee = myEmployees[i];
  13. let magicNumber = employee.extraVacay;
  14. let stillEmployed = employee.stillEmployed;
  15. let timeInJob = employee.timeInJob;
  16. let name = employee.name;
  17. if (magicNumber > 30 && timeInJob > 5 && stillEmployed == true){
  18. document.getElementById('win').innerHTML = (`Congratulations to ${name}, you have been here for ${timeInJob} years and you meet the magic number! You get 2 extra weeks of PTO!`);
  19. } else if (stillEmployed == true) {
  20. document.getElementById('here').innerHTML = (`${name}, thank you for your service over the past ${timeInJob} years. I look forward to many more years working with you!`);
  21. } else {
  22. document.getElementById('notHere').innerHTML = (`${name}, no longer works here.`)
  23. }
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement