"On a whim" is usually used to describe someone who suddenly has an idea or decision at a certain moment. This idea or decision is usually not well thought out and prepared. This sudden idea or decision may bring unexpected results, and sometimes it may fail. Therefore, "whim" often carries certain risks and uncertainties.
This idiom can also be used to describe a person's character. Some people are impulsive, easy to make decisions, like taking risks and trying new things. This kind of personality can also be called "whim". People with this personality may be more open, optimistic and interesting, but they also need to pay attention to risks and consequences.
Use the idiom "on a whim" to make sentences;
1, I decided to travel on a whim today and wanted to change the environment.
He seldom exercises, but sometimes he goes to the gym on a whim.
On a whim, she suddenly decided to learn a new skill and signed up for a training class.
Sometimes our boss will suddenly change the strategic direction of the company on a whim, which makes it difficult for us to adapt.
He decided to write a novel on a whim, but he gave up after writing for a few days.
Baidu encyclopedia-on a whim