2017.11.23

1249 단어

강력한 복습을 하다


기본 데이터 유형

1 string
2 number
3 function
4 boolean
5 undefined
###6object

테스트 데이터 유형

                        instanceof      
                        constructor     

참되다

1  true  2  0  3  4   

가령

1false 2 0 3  4 undefined 5 NaN  6 null

데이터 형식의 상용 방법


string

str.charAt();     
str.indexOf();  
str.lastIndexOf(); ( -1)
str.split(); 
str.toUpperCase(); 
str.toLowerCase(); 
str.substring(); 

arr

arr.push();     ;
arr.pop();       ;
arr.shift();      ;
arr.unshift(); ;
arr.join();  ;
arr.reverse(); ;
arr.concat(); 
arr.soft(); 
arr.soft(function(iNum1,iNum2){
    return iNum1-iNum2;       
    return iNum2-iNum1;       
})
arr.splice(); , , 
arr.splice(start,length) 
arr.splice(start,0,item1,item2,item3...) 
arr.splice(start,length,item1,item2,item3..) 

Math

Math.random(); 0-1 1
Math.ceil(); 
Math.floor(); 
Math.round(); 
Math.pow(); 
Math.sqrt(); 、
Math.abs(); 
Math.max(); 
Math.min(); 

window.navigator.userAgent.

좋은 웹페이지 즐겨찾기