Javascript/jQuery
jQeury
jQuery 로 함수 작성 jquery 에서 class 는 id function 함수이름() { let a = 'Value' $('#id'). } 사이 반복문 forEach(()=>[]) : 하나씩 대입 let test = ['Value1','Value2','Value3'] test.forEach((a)=>{ console.log(a) }) : test라는 변수에 list의 요소들을 넣고, a 라는 변수에 test에 들어 있는 list의 요소들을 하나씩 대입 * list의 요소 갯수들만큼* 조건문 if () {} esle {} : 조건이 맞았을때 실행, 조건이 틀릴 경우 실행 let a = (a) if (a) { console.log('True') } else { console.log('False') }
2023. 5. 17. 21:14