For our last WOD, SmartPhoneProducts2, (instruction page found here) we created a loop that displayed our products so that we didn’t have to hard code every section. This was a useful skill to learn because it’s easy to make mistakes when you have to hard code all of your information! Creating a generic loop will make it less likely that we will have mistakes, since we don’t have to put in as much information, while also allowing us to change and add to our products easier.
This WOD was not too bad. Thankfully, I was able to get through a lot of it without having to refer to the screencast. Not only because I was able to skip steps 1 and 2 (since I have already completed SmartPhoneProducts1 with Variables which is where we created a separate JS file to hold our product data), but also because it was very similar to the Loops lab that we completed last week. I knew how to place the script tags when creating the substitution templates, but I found it easier to place the whole loop in script tags (rather than individually like how it was set up). It was when we got to substituting the image code that tripped me up. I had to refer to the screencast to figure out that it was better to just delete the image id that was created and instead to just grab the image code itself.
The best preparation for this WOD was to refer to the Loops lab and to take a look at the related Loops reading and screencast/powerpoint that we completed last week. I knew that this was the information that I needed to know as soon as I read the note at the top of the instructions saying we were going to be creating a loop. This is pretty similar to what I do to prepare for other WODs (refer to past examples in classwork and readings).
Honestly, this WOD was not one that I had too much struggle with. The only trouble I really had was substituting the hard code of the image into a substitution template. I suppose there might have been a way to complete this by keeping the image id, however, I found it easier to just remove it altogether.