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