An identifier is a name used to identify an entity in a program. JavaScript examples use names such as WeaponGenerator and weapon alongside variable declarations and loops. section 5.5 section 6.2
Listing 6.1. Using a generator function to generate a sequence of values
function* WeaponGenerator(){ #A
yield "Katana"; #B
yield "Wakizashi"; #B
yield "Kusarigama"; #B
}
for(let weapon of WeaponGenerator()) { #C
assert(weapon !== undefined, weapon); #C
} #C
The generator listing shows identifiers in context: WeaponGenerator names the generator, and weapon names the loop variable. section 6.2




