Solution Review 2: Return an Array of Squares
Explore how to create and manipulate mutable arrays in Rust by calculating the square of each element using a for loop within functions. Understand how to update arrays in place and prepare for advanced concepts like recursion.
We'll cover the following...
We'll cover the following...
Solution:
Explanation
- On line 2, a mutable array
squareof type