HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>It seems that something has gone wrong in our program. We click on the preview, but the large image does not appear. We verified that the program works in the previous assignment: We saw the messages that were displayed in the console.</p>
1 <p>It seems that something has gone wrong in our program. We click on the preview, but the large image does not appear. We verified that the program works in the previous assignment: We saw the messages that were displayed in the console.</p>
2 <p>What do developers do in this situation? They debug the code.</p>
2 <p>What do developers do in this situation? They debug the code.</p>
3 <p>The program stopped working after we added the following code:</p>
3 <p>The program stopped working after we added the following code:</p>
4 fullPhoto.src = photos[i];<p>What could possibly be wrong with it? There is nothing suspicious about part of fullPhoto.src. We found the image by searching for its class. We saved it to a variable, and now we want to write something to the src attribute. And here photos[i] could be the cause of the failure.</p>
4 fullPhoto.src = photos[i];<p>What could possibly be wrong with it? There is nothing suspicious about part of fullPhoto.src. We found the image by searching for its class. We saved it to a variable, and now we want to write something to the src attribute. And here photos[i] could be the cause of the failure.</p>
5 <p>The issue is not with the name of the photos array. We wrote it correctly, after all. The only other aspects are the index and the current element in the array. Perhaps there is something wrong with them.</p>
5 <p>The issue is not with the name of the photos array. We wrote it correctly, after all. The only other aspects are the index and the current element in the array. Perhaps there is something wrong with them.</p>
6 <p>We will output them to the console and check them. It seems that the problem is there.</p>
6 <p>We will output them to the console and check them. It seems that the problem is there.</p>