过滤函数引用

原创 李仁伟前端笔记 随笔 js 141阅读 2018-06-12 10:17:01 举报

function numtoou(num) {
switch (parseInt(num)) {
case 0:
case 2:
case 4:
case 6:
case 8:
return '偶数'
default:
return '奇数'
}
}
export {
numtoou
}

/*****/
json 拼接 插入
conid = [1,2,3,4,5,6,7,8]
liunumb = [1,2,3,4,5,6,7,8]
temalistbot = ['a','b','c','d','e','f']
const crujson = [
{
nameid: 0,
name: 'aa',
model:1,
childlength:2,
content: [{
titles: 'aA',
list: [{
list_conid: conid,
titles: 'a1234',
list_num: liunumb,
oddscont: 49,
titles2: 'c123',
list_num2: temalistbot,
oddscont2: 49
}]
},
{
titles: 'b123',
list: [{
list_conid: conid,
list_num: liunumb,
oddscont: 49
}]
}
]
}
]
//

评论 ( 0 )
最新评论
暂无评论

赶紧努力消灭 0 回复