What is the correct way to attach the function 'go' to a click event? Facebook ReactJS Interview Question

var yo = function () {
alert('go');
};
Ans:
<button onClick={yo}></button>

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.