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
  • 34,719
  • 24
  • 185
  • 251
John Wick
  • 377
  • 1
  • 2
  • 8

0 Answers0