Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- netsh
- grep
- Eclipse
- import
- JavaScript
- 줄바꿈 문자
- ssh
- xargs
- plugin
- web.xml
- IntelliJ
- maVen
- tomcat
- Windows 10
- lsof
- port
- 네트워크
- Mac
- bash
- VirtualBox
- vscode
- find
- resource
- context
- Quartz
- Source
- Windows
- 단축키
- GIT
- profile
Archives
- Today
- Total
develog
[jquery] map 본문
let list = [11, 22, 33];
// [11, 22, 33]
console.log('list', list);
let list2 = $.map(list, function(item, index) {
console.log(index, item);
return item * 10;
});
// [11, 22, 33]
console.log('list', list);
// [110, 220, 330]
console.log('list2', list2);
https://api.jquery.com/jquery.map/
jQuery.map() | jQuery API Documentation
Description: Translate all items in an array or object to new array of items. If you wish to process a jQuery object — for example, $('div').map( callback ); — use .map() instead. The $.map() method applies a function to each item in an array or object
api.jquery.com
Comments