A exemple of pattern javascript