ChildObjects: Returns the collection of child objects contained within the object. F1帮助解释:返回当前调用对象的所有子对象 这种解释很抽象,下面我们来说一种场景,比如page对象,一个页面有100个button按钮需要一个个点击,如过我们一个一个的去click,那代码就需要100行,而需求变更,可能增加到200个button,那么我们又需要新增100个click代码行,这样效率是很低下的,那么有没有更好的应用方
1.inspect函数的基本用法 util.inspect(object,[showHidden],[depth],[colors])是一个将任意对象转换为字符串的函数,通常用于调试和错误输出.它至少接受一个参数object,即要转换的对象,我们来学习它的简单用法.使用语法如下: var util = require('util'); var result = util.inspect(object); console.log(result); 2.format函数的基本用法 format函数根
A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , where thing is either an iterator or a sequence, returns a iterator that will return (0, thing [0]) , (1, thing [1]) , (2, thing [2]) , and so forth. A c