console.log(string_to_array("Robin Singh"));

function string_to_array(str)
{
    var temp = str.split(' ');
    return temp;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: