Normally your brain and nervous-system activate your muscles.
External sources of electricity also will activate your muscles, even if your brain doesn’t want to.
Generally the electricity tends to ‘tell’ all your muscles to tense up.
Your ‘close hand’ muscles are stronger than your ‘open hand’ muscles, so they’ll win this fight and ‘succeed’ in closing your hand.
Your brain has no say, really, because any orders it gives are overpowered by the external source of electricity.
Latest Answers