Remembering button state

Here is the official Blink Without Delay Example:

It shows the basics of dealing with millis() and uses one variable for led state = on or off.

If you wanted to add a button to that it would be easy enough. The new code would be outside of the " if(currentMillis - previousMillis > interval) {" block and could change the led & ledstate as well as previousMillis to make whatever change you want/can get away with.

Once you learn millis(), look up micros().