var data = [1, 2, undefined, NaN, null, ""];
data.forEach(function(value){
console.log("value is", value);
});
var data = [1, 2, undefined, NaN, null, ""];
for(let idx in data){
console.log(data[idx]);
}
=======================================================
var data = [1, 2, undefined, NaN, null, ""];
Array.prototype.getIndex = function() {}
for(let idx in data){
console.log(data[idx]);
}
function() {}
Array.prototype.getIndex = function() {}
for(let value of data){
console.log(value);
}
============================
Array.prototype.getIndex = function() {}
for(let value of str){
console.log(value);
}
console
'TIL > Learn - JavaScript' 카테고리의 다른 글
filter, inclues, from 예제 (0) | 2019.09.24 |
---|---|
spread operator (0) | 2019.09.24 |
자바스크립트 list.push & concat (0) | 2019.09.23 |
Ajax란? (0) | 2019.09.18 |
window.onload (0) | 2019.08.30 |
comment