goodDay !coders...i need help with local storage..got nothing back from this

javascript

#1


http://frontend-basics.projectcodex.co/greeting exercise..


Replace this line with your code. 

    <script>
        function clickCounter() {
            if (typeof(Storage) !== "undefined") {
                if (localStorage.clickcount) {
                    localStorage.clickcount = number(localStorage.clickcount) + 1;
                } else {
                    localStorage.clickcount = 1;
                }
                document.getElementById("result").innerHTML = "x()" + localStorage.clickcount + "clicks";

            } else {
                document.getElementById("result").innerHTML = "sorry your web browser does not support web storage..";

            }
        }
    </script>


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.