how to access variable outside function in javascript

my head sounds like a watermelon × Fale Conosco!