1
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?

Lajos Arpad
  • 53,986
  • 28
  • 88
  • 159
Yash Sharma
  • 157
  • 7

0 Answers0