The following examples are for JavaScript programming language.
We can use console() to check in Browser Console.
Sample Code:
console.log( 'Data - ' + JSON.stringify( response.getReturnValue() ) );
(Or)
Use the below code to check response.getReturnValue() returned value or not
Sample Code:
response.getReturnValue().length > 0
Use either Console.log or alert 😉
var state = response.getState();
if (state === "SUCCESS")
What would be it's equivalent in LWC?
You use if ( data ) { } in LWC if you are using wire.
Sample code – https://www.infallibletechie.com/2020/04/how-to-wrap-text-in-table-in-lwc-in.html