随笔分类 - ts
摘要:ES6 教程 - JavaScript 教程 ES6 类 之前 function Person(name) { this.name = name; } Person.prototype.getName = function () { return this.name; }; var john = n
阅读全文
摘要:method是类里的。Function是独立的
阅读全文
摘要:/** * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. * @param searchElement The value to locate in the
阅读全文
摘要:fangFa([a, b]){ } this.fangFa([1,2]);
阅读全文
摘要:try{ } catch (e) { cc.error(e.message); } 能catch到异常,但还是卡死,感觉没啥用。而且catch不到异步代码里的异常
阅读全文
摘要:数组 let a = [1,2],b =[1,2]; a.toString() == b.toString() map let c = {"d":33,"f":44},d = {"d":33,"f":44}; JSON.stringify(c) == JSON.stringify(d);
阅读全文
摘要:nums: number[] let nums_set:Set<number> = new Set(); for(const num of nums){ nums_set.add(num); } for...of 循环是 ES6 (ECMAScript 2015) 引入的一种新的 for 循环语法,
阅读全文
摘要:不加或者用undefined add(3); add(3,undefined,2); add(a = 1,b = 2, c=3) { ... }
阅读全文
摘要:arrayCollectionA.source = arrayCollectionB.source;
阅读全文

浙公网安备 33010602011771号