temporary GUI text

Well I am kind of new to unity and javascript, but do anyone know how to make temporary GUI texts (If it is possible)… I would be happy if anyone helped me with that. :face_with_spiral_eyes:

function OnGUI () {
    GUI.Label (Rect (10, 10, 100, 20), "Hello World!");
}

Just put an if statement in there to only show the message when you want it to appear

Thanks