<!
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
<script>
let input = [
{ name: "Alice", salary: 50000, company: "Tech Corp", age: 28,
gender: "male" },
{ name: "Bob", salary: 60000, company: "Innovate Ltd", age: 34,
gender: "male" },
{ name: "Charlie", salary: 70000, company: "BuildWorks", age: 29,
gender: "female" },
{ name: "EDiana", salary: 75000, company: "Tech Corp", age: 40,
gender: "female" }
];
Questions on Array of Objects (JavaScript)
1. Print the names of all employees.
2. Print all employees who work in "Tech Corp".
3. Find the employee with the highest salary.
4. Find the employee with the lowest salary.
5. Calculate the total salary of all employees.
6. Calculate the average salary of all employees.
7. Print the names of employees whose age is above 30.
8. Count how many male and female employees are there.
9. Sort employees by salary in ascending order.
10. Sort employees by age in descending order.
11. Print only names and companies of all employees.
12. Check if there is any employee working in "Google".
13. Find the employee named "Charlie" and print details.
14. Print names of employees whose salary is greater than 60000.
15. Increase salary by 10% for employees working in "Tech Corp".
16. Create a list of only employee names in a new array.
17. Remove the employee named "Bob" from the array.
18. Group employees by company name.
19. Find the youngest employee.
20. Find the oldest employee.
</script>