Functional chaining in js.