Find the word definition

Wiktionary
on a whim

adv. (context idiomatic English) done without thinking seriously about the consequences.