When beginning with electronics, it's good to build circuits like this on breadboards.
Gate voltage of the 2n7000 can also be as high as 3V, which is getting uncomfortably close to the 3V3 of most microcontrollers. it works with this circuit (with 12V gate drive) but it's dubious when the gate gets connected directly to the uC. The 2n7002 is more common, and has a maximum threshold voltage of 2V5.