Asked
            
        
        
            Active
            
        
            Viewed 31 times
        
    -1
            
            
         
    
    
        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 Answers
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()
 
    
    
        Shimizu Hino
        
- 46
- 4