Question d’entretien chez Leopard Tech Labs

asked me to write a javascript function