Easy
This question is a daily question and will count towards your daily streak.
You are processing user data for an e-commerce platform. Each user has a list of orders, and you need to find the first active user over the age of 30 who has made at least one order. Which line of code completes the following snippet?
1let users = [2 {3 name: 'Alice',4 age: 25,5 isActive: true,6 orders: []7 },8 {9 name: 'Bob',10 age: 35,11 isActive: false,12 orders: ['Order123']13 },14 {15 name: 'Charlie',16 age: 40,17 isActive: true,18 orders: ['Order456', 'Order789']19 },20 {21 name: 'Diana',22 age: 28,23 isActive: true,24 orders: ['Order101']25 }26];2728let result = users. /* Missing Line Here */;29console.log(result ? result.name : 'No matching user found');