When times are good, you should be cheerful; when times are bad, think what it means. God makes them both to keep us from knowing what will happen next.
I thought about these things. Then I understood that God has power over everyone, even those of us who are wise and live right. Anything can happen to any of us, and so we never know if life will be good or bad.