Toggle Button For LED Strip not executing properly
If you have just connected a switch to the Arduino pin, like the image below, it will just return "random" undefined results:



There are various ways of avoiding this, including using a pull-down resistor to ensure that, if the switch is open, it will read LOW. For example:



There are other possible techniques as discussed on this page.

One is to change:

   pinMode(inPin, INPUT);//this time we will set the pin as INPUT


to:

   pinMode(inPin, INPUT_PULLUP);//this time we will set the pin as INPUT


Then wire the switch to ground, not +5 V. That way the pull-up resistor pulls the switch HIGH, and when you close the switch it is LOW.