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.
精彩评论