Why this error in js?

Hello!
There is a simple piece of code ( taken from the console ):
5a2d32d02fe7b065759537.jpeg

Html:
5a2d32ddf01be744190611.jpeg

Returns:
5a2d32f15856f443467445.jpeg

Why 0?

The same code works here.

Work with Gulp. Maybe it is something spoils?
Do you have any idea?

Thank you.
June 10th 19 at 16:30
1 answer
June 10th 19 at 16:32
Solution
DOM not loaded, execute the code after the DOMContentLoaded
Thank you. - viva_Veum commented on June 10th 19 at 16:35
, querySelector is ByClassName use, more convenient and more readable code will be released. - Finn_Emmerich commented on June 10th 19 at 16:38

Find more questions by tags JavaScript