Looping

 Looping was pretty self-explanatory and very similar to what we did in bash. So we did for loops, now if we remember and for loop runs from the start to finish of a loop. But we also did a while loop, which continues to execute as long as something is true. Now I got a little ahead of myself and I am going to show you and then I will post the finished correct loop.


This is a pretty simple one where it printed the name of the veggies.



                            Now can you see the mistake here? I wanted it to print 1,2,3,4,... to10. But I told it to print 1. Now what I thought was worth noting and interesting is that it still only counted to 10 and then stopped. SO just because I had messed up and it didn't print the correct numbers it still ran properly.


And this is the correct way, this ended with it printing 1,2,3,4,...

As always feel free to reach out on LinkedIn or Twitter



Comments

Popular posts from this blog

LLMNR

More mitigations

Overwrite and BadChars