일반적인 함수 선언 방식은 다음과 같다. // 함수 선언식 function funcDecl() { console.log("Function Declarations!"); } // 함수 표현식 const funcExpr = function() { console.log("Function Expressions!"); } 화살표 함수는 함수 표현식으로 작성된 함수를 보다 단순하고 간결하게 만들어준다. i). 문법 const funcName = (arg1, arg2, arg3) => expression // 위 함수는 다음과 같은 의미를 갖는다. const funcExpr = function(arg1, arg2, arg3) { expression } ii). 예시 const funcSum = (num1, num2)..
이 글은 아래 사이트를 토대로 작성되었습니다. jQuery Best Practices jQuery Best Practices Greg Franko About the Speaker JavaScript Engineer at AddThis (We are hiring) Open Source Enthusiast Soon-to-be Author Hates the word HTML5 Contact Details Github: https://github.com/gfranko Twitter: https://twitter.com/GregFranko Link gregfranko.com DOM 조작하기 i). 일반적인 경우 // elem 요소의 title 속성을 해당 요소의 text를 통해 변경 $(".container in..
이 글은 아래 사이트를 토대로 작성되었습니다. jQuery Best Practices jQuery Best Practices Greg Franko About the Speaker JavaScript Engineer at AddThis (We are hiring) Open Source Enthusiast Soon-to-be Author Hates the word HTML5 Contact Details Github: https://github.com/gfranko Twitter: https://twitter.com/GregFranko Link gregfranko.com jQuery Ready 이벤트 코드 해설 참고 i). 일반적인 경우 $("document").ready(function() { // DOM이..

둘 모두 문자열을 자르기 위해 사용하지만, 약간의 차이가 있다. let str = "0123456789"; console.log(str.substr(2, 5)); // 23456 console.log(str.substring(2, 5)); // 234 substr : 시작 인덱스부터 특정 길이만큼 자르기 substring : 시작 인덱스부터 특정 인덱스 전까지 자르기 substring은 종료 위치 이전까지 자른다는 것에 주의 220804 내용 추가 jQuery로 분류해놓았는데, 정작 substr랑 substring은 jQuery만의 기능이 아니다. 왜 요딴식으로 작성해놨지? 두 기능은 모두 String.prototype에 포함되며, 기능은 상술한 바와 같지만 substr는 더 이상 사용이 권장되지 않는다..
해당 문서는 JS 공부 중 정리하게된 내용이기에 JS 기준으로 작성되었습니다. 해당 문서는 아래의 블로그 글들을 나름대로 정리한 것이므로, 아래의 링크를 통해 훨씬 상세한 내용을 확인하실 수 있습니다. 참고 : - https://hyunseob.github.io/2016/09/17/lambda-anonymous-function-closure/ - https://medium.com/@khwsc1/%EB%B2%88%EC%97%AD-%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%EC%8A%A4%EC%BD%94%ED%94%84%EC%99%80-%ED%81%B4%EB%A1%9C%EC%A0%80-javascript-scope-and-closures-8d402c9..
위와 같은 경우, 다음과 같이 div를 ace editor로 사용할 수 있다. let data = { "hello": "world" } let jsonEditor = getCodeEditor("jsonEditor", "ace/mode/json"); let str = JSON.stringify(data, undefined, 4); jsonEditor.setValue(str); console.log("The Contents of ace editor : " + jsonEditor.getValue()); jsonEditor.setReadOnly(true); getCodeEditor : ace editor로 사용할 영역의 ID와 모드를 매개 변수로 입력 값 설정은 setValue()를 사용. 이 때, Json 형..
// checkbox 개수 let count = $("input:checkbox[name=checkboxName]").length; // 선택된 checkbox만 let count_selected = $("input:checkbox[name=checkboxName]:checked").length; // checkbox 전체에 .each let checkboxList = []; $("input:checkbox[name=checkboxName]").each(function() { checkboxList.push($(this).val()); }); // checkbox 중 check 된 것만 .each let selectedList = []; $("input:checkbox[name=checkboxName]"..
- Total
- Today
- Yesterday
- JPA
- spring boot
- Spring Cloud Config
- react
- Java
- pgloader
- Database
- AWS
- mysql
- hashicorp
- Git
- Vault
- Docker
- kotlin
- terraform
- etc
- Gradle
- RancherDesktop
- Node.js
- Linux
- postgresql
- IntelliJ
- Puppeteer
- 코딩테스트
- eureka
- jQuery
- AWS IoT
- javascript
- JEST
- shell
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |