Can't get the clicked image Title in the Gallery

I have an image gallery, from which I am trying to get the Title of the image, I am successful using this code
$w( ‘#gallery10’ ).onItemClicked(()=>{
let items = $w( “#gallery10” ).items;
let title = items[ 5 ].title
console.log(title);
})
This code gives me the title of 6th image in the gallery, but what I am trying to achieve is to get the Title of the image which is clicked. How can I do so?

The Gallery is not connected to Dataset.

Thanks.

Moving to Coding with Velo category. Hopefully someone can assist with the code there.