File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 4949 < div class ="text-center flex justify-between items-center ">
5050 < a href ="https://github.com/alsiam/web-projects "
5151 class ="text-xl md:text-3xl text-blue-500 text-center font-bold font-mono ">
52- AL PROJECTS :)
52+ HTML PROJECTS < span class =" bg-red-500 text-white p-2 h-full rounded-full text-sm relative top-[-12px] left-[-12px] " > 22+ </ span >
5353 </ a >
5454
5555 < a class ="bg-slate-800 hover:bg-slate-900 text-white font-medium py-1 px-2 md:py-2 md:px-4 rounded-full "
56- href ="https://github.com/alsiam/web -projects ">
56+ href ="https://github.com/alsiam/html -projects ">
5757 Follow on GitHub
5858 </ a >
5959 </ div >
Original file line number Diff line number Diff line change 11const localStorageList = ( ) => {
22 const list = getList ( ) ;
3- for ( const taskName in list ) {
4- displayList ( taskName )
3+ for ( const name in list ) {
4+ displayList ( name )
55 }
66}
77const addItem = ( ) => {
@@ -21,10 +21,10 @@ const addItem = () => {
2121 inputField . value = '' ;
2222
2323}
24- const displayList = taskName => {
24+ const displayList = name => {
2525 const ul = document . getElementById ( 'ul-list' ) ;
2626 const li = document . createElement ( 'li' ) ;
27- li . innerHTML = taskName ;
27+ li . innerHTML = name ;
2828
2929 ul . appendChild ( li ) ;
3030}
@@ -39,12 +39,12 @@ const getList = () => {
3939 }
4040 return listObject ;
4141}
42- const addList = taskName => {
42+ const addList = name => {
4343 const list = getList ( ) ;
44- if ( list [ taskName ] ) {
45- list [ taskName ] = list [ taskName ] + 1 ;
44+ if ( list [ name ] ) {
45+ list [ name ] = list [ name ] + 1 ;
4646 } else {
47- list [ taskName ] = 1 ;
47+ list [ name ] = 1 ;
4848 }
4949 const listStringified = JSON . stringify ( list ) ;
5050 localStorage . setItem ( 'list' , listStringified ) ;
You can’t perform that action at this time.
0 commit comments