Is there a way to hide and show the timeline in blender 2.8 series?
The Timeline is not part of the 3D Viewport, but it is a Editor Type with a window of its own. In the default start up file you can get rid of it by clicking on a bottom corner of the 3D Viewport and hold and drag it down over the Timeline.
(Alternatively you could also right click on the edge of two windows an select Join Areas)

Click and drag the corner back up to make the window appear again. Only now the window is another 3D Viewport so you'll have to change the Editor Type back to Timeline.
This for instance can be done to mouse-over a window and press (by default) Shift-F12 twice.

I'm not aware of any quicker way to do this : )