Hi J.,
My 19 month old did the same thing, still does now and then. I've noticed a couple things.
First, when my nephew did it to my sister, we were all very judgemental and thought she should've done things differently. When my son started doing it, I had a lot more sympathy for my sister.
Patrick thinks everything is a game. He likes hitting us. He likes hitting his brother (3yo). He likes hitting the cat. We say 'no' and he giggles. If Mommy and Daddy are both present when he does it, we both say 'no.' One of us holds him in a 'time-in' and the other tends to the 'ouchie.' Then he has to apologize. This is usually a hug, or patting on the back.
If we get angry, or riled up, he thinks it's more fun. If we ignore the behavour, he thinks it is OK. The only thing that works for us, is getting down on his level, so he can't pretend that he didn't hear you, and being very serious. "We don't hit." the offending toy gets taken away. He has to face the ouchie he caused to someone else. We have to be extremely consistent with him. He likes to push our buttons and is always testing the limits.
We also try to give him appropriate outlets for his behavior. He can hit a 'drum' or clap his hands, or stomp his feet. 'If you're angry and you know it, stomp your feet.'
There's also some theory that by hitting and throwning their arms around, the child is learning to identify where they are in relation to the space and objects around them. But my thinking is that even if the behavior is developmental, there need to be limits. Touch gently.
Good Luck!
C.