tags:

views:

11

answers:

1

Just wanted to write some recursion but can't check if the child is in fact 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

A: 

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.

geowa4