0

I am trying to execute a javascript call to my array. Howerver I am having a few problems. The following three statements work perfectly fine.

 var Greetings = Hi;
 console.log (Greetings);
 console.log (obj.Hi);

I want to execute this statement but the console log says my variable is undefined.

 var search = obj.Greetings;
 console.log (search);

How can I execute the last two lines of code so I am returned with what is returned during (obj.Hi)

Cœur
  • 37,241
  • 25
  • 195
  • 267
John Wick
  • 387
  • 1
  • 2
  • 8

0 Answers0