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
  • 64,414
  • 37
  • 100
  • 175
Yash Sharma
  • 232
  • 2
  • 12

0 Answers0