last day (15 days later) » 

8:24 PM
2
A: how to extract first word first letter and second word first letter using angular

Manas KhandelwalYou can chain multiple functions. Like this: const fullName = "John Doe"; const output = fullName.split(" ").map((i) => i[0]).join("") console.log(output); If you want to reuse it the make a function, like this: const fullName = "John Doe"; const nameReducer = (name) => name.s...

 
I have a div tag where i need to place the output how i can do could you please help me
 
@Mr.M I have edited the answer, in the 2nd example, you can add the output to the div.
 
iam trying to implement the same in angular but I am getting lot of erors
 
@Mr.M It might be a syntax positioning error. I have updated it... It should work now!
 
cool but i only need first and last no middle name
 
8:24 PM
@Mr.M I mentioned there Just for demonstration!.
 
Hi
 
πŸ˜€πŸ˜€
Do you want to ask something?
Should I leave❗❕
 
oh sorry I am just trying your code
Admin k L Name

so what is happening is

i got what i need but

for this coming as A K L N
but what i want is A K
in your code
almost we are there
 
some how we have to restrict only frist word and second word first lettter
 
8:33 PM
That is very easy.. Editing my answer!
 
we have to add slice right
is that correct
 
No, we can do it without slice also...
 
oh ok
 
I have updated the answer
 
cool
but it 's not coming in the stack
 
8:41 PM
stack?
 
stackoverflow
the question is not updated
it seems
 
ok got it
cool
i will upvote

could you please up vote my question also
i did it for you
 
you put and revert it :)
got it
thanks
:)
 
8:46 PM
I did it!
✌✌
 
thank you so much
 
bye
 

last day (15 days later) »