getting codes from my db is not working. Any advice?

Turns out I had too many ONREADY commands!. I’m a little closer, but still not there and could use a couple fresh eyes as mine are red from online searching. Below is the current code (I know basic), and line 10 seems to have an issue, but I cannot tell what that issue is.

Here is line 10: console . log ( "RESULTS: " , RESULTS );

Here is the console… which is exciting cause I can actually see some data, but I don’t know why Line10 is a problem and why the data is not appearing on the web-page. Actually, my goal is to assign a RESULT to a customer and have this “RESULT” displayed on the thank you page, but maybe I’m getting a head of myself. In a subscription, my goal is to assign a RESULT to a customer so each subscription payment is shown as a new order, but that RESULT CODE doesn’t change.
my first objective is just to display the RESULT code… which seems basic but is a mountain of an issue for me. Any help is appreciated greatly. Thank you

import wixData from ‘wix-data’ ;

$w . onReady ( async function () {
let RESULTS ;
//console.log("RESULTS: ", RESULTS);
wixData . query ( “Diamond” )
. find ()
. then (( res ) => {
RESULTS = res . items
console . log ( "RESULTS: " , RESULTS );

    }) 
    . catch (( err ) => {  console . log ( err ); }); 

});

function checkData () {
wixData . query ( “Diamond” )
. find ()
. then (( res ) => { console . log ( res . items ) })
. catch (( err ) => { console . log ( err ); });
}