Skip to content

Commit ad02552

Browse files
committed
Add note about console.log possibly not working as standalone function
In chapter 5
1 parent d17d538 commit ad02552

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

05_higher_order.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ forEach(["Wampeter", "Foma", "Granfalloon"], console.log);
175175
// → Granfalloon
176176
----
177177

178+
(In some browsers, calling `console.log` in this way does not work.
179+
You can use `alert` instead of `console.log` if this example fails to
180+
work.)
181+
178182
Often, you don't pass a predefined function to `forEach` but create
179183
a function value on the spot instead.
180184

0 commit comments

Comments
 (0)