Humpty Dumpty

by Jasvir Nagra

JavaScript

// Fun with proxies

const _=new Proxy([],{get:(b,k)=>k=="_"?(console.log(b.join` `),b.length=0,_):(b.push(k),_)})

_.Humpty.Dumpty.sat.on.a.wall._
_.Humpty.Dumpty.had.a.great.fall._
_.All.the.kings.horses.and.all.the.kings.men._
_.could.not.put.Humpty.Dumpty.together.again._