Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <h1>Yearly Buttetin Board Announcements!</h1>
- <h2 id='win'></h2>
- <h3 id='here'></h3>
- <h4 id='notHere'></h4>
- <script src='app.js'></script>
- </body>
- for (i = 0; i < myEmployees.length; i++){
- const employee = myEmployees[i];
- let magicNumber = employee.extraVacay;
- let stillEmployed = employee.stillEmployed;
- let timeInJob = employee.timeInJob;
- let name = employee.name;
- if (magicNumber > 30 && timeInJob > 5 && stillEmployed == true){
- 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!`);
- } else if (stillEmployed == true) {
- 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!`);
- } else {
- document.getElementById('notHere').innerHTML = (`${name}, no longer works here.`)
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement