Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- </head>
- <body>
- <script>
- // return only the workers with salary greater than 1000 pounds
- //from the array below
- var employee = [
- { id: 10, name: "Paul Dameon", salary: 800, },
- { id: 20, name: "Temmo Wex", salary: 2000, },
- { id: 41, name: "Kalim Lintra", salary: 5000, },
- { id: 99, name: "Akpova Asty", salary: 600, },
- { id: 66, name: "Pahun Linto", salary: 5000, },
- { id: 72, name: "Cynthia Ross", salary: 8000, }
- ];
- function employeeSalary() {
- var newEmployee = employee.filter((x) => x.salary > 1000);
- document.write(newEmployee);
- console.log(newEmployee);
- }
- employeeSalary();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement