function ConvertToUpperCase()
{
var result;
var numaric = "sonia";
var Character = numaric.charAt(0);
result=Character.toUpperCase();
//In Result char is coming in UpperCase
/[B]/I want how to replace the charater at postion 0 in numaric with result[/B]
}
sonia sardana -13 Posting Whiz
Recommended Answers
Jump to PostHi sonia,
you could try this:
function ConvertToUpperCase() { var result; var numaric = "sonia"; var Character = numaric.charAt(0); result = numaric.replace( Character, Character.toUpperCase() ); // Converting target character to uppercase letter. }
Jump to PostThat will only work if you the 1st spot of character. What if she tries to point it out at
Character = numaric.charAt( 2 );
? Of course it will be needing some workaround that includes looping process, which will keep the line a bit longer compare to the used …
All 6 Replies
essential 84 Posting Shark Featured Poster
we evolve 0 Newbie Poster
essential 84 Posting Shark Featured Poster
sonia sardana -13 Posting Whiz
we evolve 0 Newbie Poster
Airshow 416 WiFi Lounge Lizard Team Colleague
essential commented: Nice execution, simple and elegant... +3
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.