Which code should you use?

You have the following code:

You need to retrieve all of the numbers from the items variable that are greater than 80.
Which code should you use?

You have the following code:

You need to retrieve all of the numbers from the items variable that are greater than 80.
Which code should you use?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Lord Vader

Lord Vader

take(80) : first 80 items in collection
first: first item in collection

A

anii

anii

And…
items.Any(x => x > 80) just checks if any item is higher than 80. The result here would be “true”.