Google interview question

Create function chaining just like in jquery with pure javascript