DEV Community


For...of & - How to Remember the Difference with ammo.

Brad Beggs
Curious and Persistent.
・1 min read

Ah, syntax. Your logic might be sound but miss those commas, brackets, or a typo turns > into '<', and bam! broken code. But, hopefully, your JSlinter catches and corrects those some of those errors.

While your linter will catch incorrect use of, how does one remember the use case for for...of or Which is for iterating over objects or through arrays/strings?

Remember the difference of & for...of.

  1. If you get shot and the bullet stays in your body, the doctor looks for the foreign object.

  2. If a {bullet: "Full Metal Jacket"} is in a javascript ammo{} object, a developer looks object. The pun/trick is pronouncing as “foreign.”

Do brush up on usage as it doesn’t loop in an ordered fashion. This Bits of Code article explains well when to use

Other Memory Devices?

What tricks or methods do you use to remember syntax or bits of code?


ESLint Documentation on For..of
Bits of Code - versus for..of Loops

Discussion (1)

jazzi profile image

You can find many online platforms to purchase ammunition. You may have a lot of information about ammunition from different blogs. There are many types of night vision accessories, which you can purchase online. Thermal vision goggles are the latest form of thermal vision goggles. You can purchase it from the Going Dark online ammunition website.