Here's some student code, shared w/ permission.
What feedback would you give?
What do you think they're confused about? What concepts do you think they understand?
I wonder if the student had a mental model around variable names. I noticed they slavishly write ‘string’. Could they be thinking that that’s a special keyword? I would follow up by changing the parameter and asking them what they think might happen.
I write the initial function declaration for them, so the name of the function and arguments comes from me.
But the confusion you describe is super common, thinking variable names impact what values they can reference.