var myStr1 = "hamid ali";
var matches = myStr1.match(/\b(\w)/g);
console.log(matches.join('')
C# | MVC | DotnetCore | Web API | Blazor | HTML | BootStrap | JavaScript | JQuery | EF | Angular | SQL | Azure
var myStr1 = "hamid ali";
var matches = myStr1.match(/\b(\w)/g);
console.log(matches.join('')
To set all FormGroup values use, setValue:
this.myFormGroup.setValue({
name: 'h1',
designation: 'se'
});
this.myFormGroup.patchValue({
name: 'h1',
// designation: 'se' (can be omitted)
});