whenever means 'at whatever time or occasion.' It is an indefinite adverb, as it refers to a time that cannot be gleaned from the story or context of a sentence.
Whenever is often used with questions such as 'whenever did you get here?' or 'whenever did you find out?' as a way of asking questions about when a certain event happened. It is also commonly used to make statements such as 'whenever I hear that song, it makes me feel nostalgic for my childhood.'
1. Whenever I receive a letter, I'm always so excited for something new.
2. I can't remember whenever I decided to go to college.
3. Whenever he visits, we always have so much fun.
Whenever can be used interchangeably with 'when,' but it is not a proper replacement for 'when' in all contexts. If the time of the event is clear, 'when' is more correct. Additionally, the indefinite adverb form of 'whenever' should not be confused with the conjunctive adverb 'when,' which is used to connect two independent clauses.