def test_parallel_assignments_with_splat_operator
first_name, *last_name = ["John", "Smith", "III"]
assert_equal "John", first_name
assert_equal ["Smith", "III"], last_name
end
Hope you have been enlightened.
If you find this insightful, please comment below.
If you don't find this helpful, go ahead and comment anyway. Let me know if there is any way I can write these to make them more clear.
Brought to you by KENYACODE. Can you code?
No comments:
Post a Comment