I am trying to use the console to show what image is linked to the thumbnail. I keep getting this error: console error
Here is my code: Js Code
var DETAIL_IMAGE_SELECTOR = '[data-image-role="target"]';
var DETAIL_TITLE_SELECTOR = '[data-image-role="title"]';
var THUMBNAIL_LINK_SELECTOR = '[data-image-role="trigger"]';
function setDetails(imageUrl, titleText) {
'use strict';
var detailImage = document.querySelector(DETAIL_IMAGE_SELECTOR);
detailImage.setAttribute('src', imageUrl);
var detailTitle = document.querySelector(DETAIL_TITLE_SELECTOR);
detailTitle.textContent = titleText;
}
function imageFromThumb (thumbnail) {
'use strict';
return thumbnail.getAttribute('data-image-url');
}