๐Ÿ“˜function*

JS โŸฉ concepts โŸฉ expression โŸฉ function* expression

an expression that evaluate to a generator function as value.

๐Ÿ‘‰ compare๏ผš function expression

// โญ๏ธ 1. as "variable"
//
//           โ•ญโ”€โ”€โ”€โ”€โ”€ ๐Ÿ”ธ function* expression โ”€โ”€โ”€โ”€โ”€โ•ฎ
   const f = function*() { yield 'a'; yield 'b'; };
// โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ const expression โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Last updated