Write a JavaScript program to split name using string's split() method.
<html>
<head>
<title>Manipulating a String</title>
</head>
<body>
<script>
var name = prompt('Enter ur name');
var text = name.split(' ');
document.write('First name: ' + text[0] + "<br/>");
document.write('Last name: ' + text[1]);
</script>
</body>
</html>
