Assessment wanted for Image gallery by Dinesh

Hello there :wave:,
I have recently finished working with Image gallery Assessment. And I need someone to review my code and share some inputs on how to improve the code any further. Here are the code link and task link.

Thank you in Advance,
Dinesh

Hi @Dinesh_Sake

Very well done. Everything is correct! :medal_sports:

A few simplifications:

  • You used `${file}`. If we just have a variable you can simply do this: file.
  • Most of the time it’s fine to use “dot notation” to access HTML attributes in JS. You won’t need setAttribute() or getAttribute(). For example: displayedImage.src = e.target.src.

Have a nice weekend,
Michael

1 Like

Okay sir, I did the changes recommended by you. Thanks for the help.

1 Like

Well done! Much cleaner now. :slightly_smiling_face: