A

Admin • 825.56K Points
Coach

Q. What is the result of the expression `vec![1, 2, 3].contains(&2)`?

  • (A) false
  • (B) true
  • (C) Error
  • (D) None
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`contains(&x)` returns `true` if `x` is present in the vector.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.