Am Unable to Get Data from a Function ;

@muthu

Here the right example … :grin:

$w.onReady(async function () {
    console.log(getName())
});


function getName() {
 let productName = "Product-1";
 let productPrice = "Product-Price-1";
 let details = [productName, productPrice];
 return details
}

Good luck and happy coding.