Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Javascript and String

  Asked By: Violet    Date: Jan 01    Category: Java    Views: 810
  

I have some names. ( last name , first name )

I want to show that as ( first name , last name )

I tried but cannot figure how out to write code in javascript to do
that. Can anyone please give me any clue.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Harold Graham     Answered On: Jan 01

Look at the split() function and then it should become
very clear.

 
Answer #2    Answered By: Giovanna Silva     Answered On: Jan 01

<script>
function showNames(last, first){
alert(first + ' ' + last);
}
</script>

 
Didn't find what you were looking for? Find more on Javascript and String Or get search suggestion and latest updates.




Tagged: