var scope js code example Example: scope in js // the scope is by default global var name = 'Hammad';