implements clearData and displayData  functions in localStorage sample