开发者

In Js How to wrap all last childred of an oject tree?

Just wanted to write some recursion but can't check if the child is in fac开发者_JS百科t some finite thing, when checking throught jQuery.isPlainObject , just getting a saparate letters as a childs , like I want "this is error message" - to be a last child , but can't detect it


Shot in the dark here:

typeof "hello" === "string"

typeof {} === "object"

With this, you can tell if the child is a string ("this is error message") or another type of object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜