标签:size fun UI name UNC room color info http
1 function getSize(width, height,depth){ 2 var area =width*height; 3 var volume=width*height*depth; 4 var sizes=[area,volume]; 5 Return sizes; 6 } 7 Var areaOne=getSize(3,2,3)[0];//获取面积,sizes数组中第一个值 8 Var volumeOne=getSize(3,2,3)[1];//获取size数组中第二个值
1 Var hotel={ 2 Name:‘limy‘,//属性 3 Rooms:40, 4 Booked:25, 5 Qym:true, 6 roomTypes:[‘twin‘,‘double‘,‘suite‘], 7 checkAvailability:function(){//方法 8 Return this.room-this.booked; 9 } 10 };
3、访问对象
标签:size fun UI name UNC room color info http
原文地址:https://www.cnblogs.com/qianxinyi/p/8847645.html