index.js:5 Uncaught TypeError: Cannot set property 'src' of null code example
Example: calendar.js:156 Uncaught TypeError: Cannot set property 'src' of null at HTMLDivElement.
If your img element looks like this,
<img id="idToTarget" src="">
and SRC is set to a valid resource URI, then
document.getElementById('idToTarget').src = SRC
is how that line would be written.