Javascript Javascript Global Variables May 24, 2015 Pramod T P Leave a comment Global variables are those that are available throughout the length of the code, that is, these have no scope. The var keyword is used to declare a local variable or object. If the var keyword is omitted, a global variable is declared.