print a variable

How can i print or get the value of variable in wix code api.
for exapmle
$w.onReady(function () {
let locale = wixWindow.locale; // “en”
console.log(locale);
);
but no output shows on frontend in console.
can you please help me asap
Thanks in advance

Hi Dharmender ,

Your code is totally fine, be sure that you imported the wixWindow at the top of your code.

import wixWindow from 'wix-window';

Hope this helps!
Best,

Mustafa

i have already used ’ import wixWindow from ‘wix-window’;’ at top of my code.
but no output.

could you please send the url of your site?

this is my live site url.

I don’t know how to show a variable

Please add your issue as a new post rather than bumping up an old post from 2018.