js output helper