js practice for output data