Calling a javascript function onclick

I am trying to call an onclick function . However, I keep getting Test is undefined on my chrome console.

a = “Test”

Hi, I was freaking out with the very same thing. I see some erratic behaviour as in ‘now works’ ‘now it doesn’t’ ..