字符串函数

const sum = new Function('a', 'b', 'return a + b'); 
console.log(sum(1, 2));//3


let search_data_line = (new Function('', "return (" + dataSource.fetchFun + ")('" + line + "')"))();
posted @ 2022-12-23 08:53  小庄的blog  阅读(11)  评论(0编辑  收藏  举报