Tag: javascript

javascript-in_and_hasOwnProperty

Javascript ‘in’ and ‘object.hasOwnProperty’1var book = {2 title: "High Performance JavaScript",3 publisher: "Yahoo! Press" 4};56alert(book.hasOwnProperty("

javascript-sort

JavaScript SortNotes Javascript’s sort function is basically sorted by string(even if the value is a number).1var arr = [2,12,3,4,1];2console.log(arr.sort());3// [1, 12, 2, 3, 4] Target

javascript-map_reduce_filter

map, reduce, filterArray.prototype.map구문 1arr.map(callback[, thisArg]) callback 매개변수 currentValue: 현재 요소 index: 인덱스 array: 대상 Array thisArg: callback시 this로 활용되는 값사용법11[1, 2, 3, 4].map(function (va