Skip to content
Advertisement

How to use one type in method?

I have two forms, one form to create user and one to update user.These forms are similiar and I want to use one type in my method,I wouldn’t like to create two methods one to create user from registerForm and second to create user from updateForm

JavaScript

Advertisement

Answer

Use generic method like this:

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement