This HTML5 document contains 9 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
foafhttp://xmlns.com/foaf/0.1/
n2http://ods-qa.openlinksw.com:8896/about/id/entity/https/discourse.mozilla.org/t/image-gallery-assessment/
n5https://discourse.mozilla.org/t/image-gallery-assessment/
pwdrhttp://www.w3.org/2007/05/powder-s#
schemahttp://schema.org/
rdfshttp://www.w3.org/2000/01/rdf-schema#
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n4http://ods-qa.openlinksw.com:8896/proxy-iri/
n8http://ods-qa.openlinksw.com:8896/about/id/https/discourse.mozilla.org/t/image-gallery-assessment/
xsdhhttp://www.w3.org/2001/XMLSchema#
siochttp://rdfs.org/sioc/ns#
Subject Item
n5:24687
foaf:topic
n4:2138357a666228e8fd3853708b41320ebd57055c
Subject Item
n2:24687
sioc:container_of
n4:2138357a666228e8fd3853708b41320ebd57055c
Subject Item
n4:2138357a666228e8fd3853708b41320ebd57055c
rdf:type
rdf:Statement
rdfs:label
Embedded HTML5 Microdata Statement 115
pwdr:describedby
n2:24687 n8:24687
rdf:object
AvidLearner: Here, my function sourceAlter only has the parameter e and therefore, I did not pass any parameters when I called the function, hence image[i].addEventListener('click', sourceAlter) without any parentheses and parameters. However, what if my function requires two parameters, e.g. sourceAlter(a, b) , how do I pass on the parameters to said function? I don’t quite understand how looping works in JavaScript. It somehow does not make sense to me how for (...) in my code above worked. I do know that it loops five times (as expressed in the conditional statement i < image.length ) and that whenever an image with the order i is clicked, we run a function. But, when we click picture 1, 2,3 and then 1 again, it somehow worked? There is not decrement in the for loop, so how did it happen? Is the loop run over again after each action (in this case, click (but doesn’t have to be necessarily a click))? So to answer the first question, this isn’t the simplest, but it is possible. This stack overflow answer is useful, and contains multiple ways of doing it: https://stackoverflow.com/questions/256754/how-to-pass-arguments-to-addeventlistener-listener-function For the second question, the loop only runs once. But one of the main things the loop does is to add an onclick handler to each image, using this code: newImage.onclick = function(e) { var imgSrc = e.target.getAttribute('src'); displayImage(imgSrc); } because that handler is added to each image, it is run every time an image is clicked.
rdf:predicate
schema:articleBody
rdf:subject
n4:51c0ca3b0d00d753911c01ce981a77ef6e161166