let x = "Hello"
function greet(x) {
return x(/*variable*/) === x(/*parameter*/) ? 'Hello' : 'Hi'
}
greet('Some text')
The question is simple whether I can use the variable x
declared in the function body when the parameter is also named as x
? If yes, how?