New course! Every coder should learn Generative AI!
Try a free lesson+ 2
97
Edit: The reason why x doesn't increment, is because you are passing x as an argument,, specifically, you're passing it by value, not by reference. I'm not entirely sure though. If it's caused by some different reason, please correct me.