-1

js code to read data from mysql database using Get method ,but when call ReadJson function the result appeared un define

Gis 92
  • 1
  • 1
  • Don't post images of code. Just post the code itself. Wrapping it in 3 backticks will format it as well. Also don't tag php and Laravel because your question is only about your JS code. Whether or not the JS code accesses a PHP backend or one in any other language is irrelevant – apokryfos Oct 01 '22 at 06:46

1 Answers1

0

Because you can't return a value from callback function, you probably need to assign a value to a varaible outside the function.
Return from a promise then()