if Laptop is easier to get virus?

Some of my friends tell me, if I want to buy a laptop, I have to worry about the virus problem, as it is easier to get hacked than desktop, I am not sure if this is true.

If any one can share some information with me ?