Without let before name - TypeError: name.map is not a function
问题 If I don't use let or var before allocation to my varaiable name I get a TypeError: name.map is not a function Is name a reserved word or anything else. If so I'm wondering why I don't get any error at the allocation name = [ ... ]; Can anybody give me some more information about this behaviour. name = ["apple", "orange", "strawberry", "banana"]; result = name.map(elem => elem.toUpperCase() ); console.log(result); If I put let or var before it works as desired. let name = ["apple", "orange",