JSFiddle - React, Tailwind, and code Playground
JavaScript
if ((localStorage.pageViews = (+localStorage.pageViews || 0) + 1) > 3) {
alert('Marketing');
}
if ((localStorage.pageViews = (+localStorage.pageViews || 0) + 1) > 3) {
alert('Marketing');
}