Is my code giving error or not?

var a=10;
function Print(){
console.log(a);
}
print();

i wrote this code in my vs code and when i try to see the output and go to live server page, the live server page asks me print the paper option as i have clicked the print option. so what is this? is my code not running properly? does my code have any error??? please explain it.

You should open HTML file in chrome and right click and click inspect element and then go to console it will show output there