[JavaScript] Inline objects and multiple arguments

As suggested at #5 and #10.