News for hackers. Stuff that matters.
Re:Proxy, a new JavaScript ES6 feature by syspec on Friday May 18, 2018 @03:15AM (#17099306)
The use of `document.write` for this entry instead of the usual console threw me off at first.
Re:Proxy, a new JavaScript ES6 feature by tlrobinson on Friday May 18, 2018 @03:32AM (#17099369)
Presumably so you can see the output in the embedded JSFiddles.

FYI, if you're embedding a JSFiddle you could also just drop this in the HTML section then use console.log:

    <script>console.log = function(str) { document.write(str, "<br/>") }</script>
Re:Proxy, a new JavaScript ES6 feature by sametmax on Friday May 18, 2018 @03:53AM (#17099457)
JSFiddle should just have a tick box with "intercept console.log" and a tab with the output .
Re:Proxy, a new JavaScript ES6 feature by tirthbodawala on Friday May 18, 2018 @04:22AM (#17099588)
Hahahaha...It should!
Re:Proxy, a new JavaScript ES6 feature by tazard on Friday May 18, 2018 @08:02AM (#17100704)
I feel as though this is a missed opportunity to use a proxy!
Re:Proxy, a new JavaScript ES6 feature by icc97 on Friday May 18, 2018 @06:58AM (#17100409)
I initially stared at that with horror, but I suspect that Stack Overflow does something similar with their code snippets. If you write console.log it gets output to the screen [0]

[0]: https://stackoverflow.com/a/49968603/327074

Re:Proxy, a new JavaScript ES6 feature by yashthakur on Friday May 18, 2018 @07:28AM (#17100531)
It is just because since all the JSFiddles are on one page. All the console.log would be together in the console and it would be difficult to know which console is for which code.

Hence document.write is used.

Though HTML could be used but that would just increase one more tab to show useless HTML. ;)