JSFiddle - React, Tailwind, and code Playground

HTML

<div id="foo"></div>

JavaScript

afficher="album/14 expositions divers/abbaye de cercanceaux photo013.jpg"
fichier=afficher.split('/').pop();
document.getElementById('foo').innerHTML=fichier;