Python Method Chaining Javascript Editor Code