Is it possible to write a condition if, when the button is pressed, function 1 is played, then name = "Vlad"?
Is it possible to write a condition if function 1 is played when the button is pressed, then name = "Vlad"?
Yes, it is possible.Anonymous
Not sure if you want 3 different functions. It is better to put names in the date attributes of buttons and catch clicks on all buttons in one handler. Because you can click past the button, check if there is a date property on the element that was clicked before assigning a new name. Like thisEleanor Floyd
It remains to understand what "function is reproduced " means.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!