Adding –ever to question words changes their meaning to "it doesn’t matter how/what/which/when/where/who".
- who + '-ever' = whoever (it doesn't matter who)
- what + '-ever' = whatever (it doesn't matter what)
- where + '-ever' = wherever (it doesn't matter where)
- when + '-ever' = whenever (it doesn't matter when)
- which + '-ever' = whichever (it doesn't matter which one)
- how + '-ever' = however (it doesn't matter how/in what way)
'However/whatever/whichever/whenever/wherever/whoever' are called compound relative pronouns. They can be used as subjects, objects and adverbs, or as conjunctions to join a clause (= partial sentence) to the rest of the sentence.
However = in any way
- How should I do your hair?
- You can do it however you want. (= adverb modifying 'do')
Whatever = any thing (unlimited choices)
- What should I do today?
- Do whatever you feel like. (= object of action 'do')
Whichever = any one from a limited set
- Which book should I choose?
- Choose whichever you prefer. (= object of action 'choose')
Whenever = any time
- When should I come to your place?
- Come whenever you are ready. (= adverb that modifies 'come')
Wherever = any place
- Where should I live?
- You can live wherever you like. (= adverb that modifies 'live')
Whoever = any person
- Who should I invite to my birthday party?
- You can invite whoever you want. (= object of action 'invite')
'Whoever' can also be used as a subject, when the identity of the subject is not important or unknown. For instance, if you say, "Whoever left their dog at the park is very irresponsible!", you are saying that the person who left their dog is very irresponsible.