Write a program to Capitalize the charater at even index poistion in a given string


<body>
<script>


var x="Spandana";

var n=x.length;
for(var i=0;i<n;i++)
{
	if(i%2==0)
	{
		console.log(x.charAt(i).toUpperCase());
	}
	else
	{
		console.log(x.charAt(i));

	}
}
</script>
</body>

How to separate the alphabets and number in a given string


<body>
<script>

var x="Spandana1224";

var n=x.length;

var text1="";
var text2="";
for(var i=0;i<n;i++)
{
	if((x.charAt(i)>='a' && x.charAt(i)<='z' )||x.charAt(i)>='A' && x.charAt(i)<='Z' )
	{
		text1+=x.charAt(i);
	}
	else
	{
		text2+=x.charAt(i);
		

	}

	
}
console.log(text1);
console.log(text2);

</script>
</body>

Write a program to find the unique numbers/ alphabets in a given String


<body>
<script>

var string="spandana"
    var unique='';
    for(var i=0; i<tring.length; i++){
        if(unique.indexOf(string[i])==-1){
            unique += string[i];
        }
    }
    console.log(unique);

</script>
</body>