Note: This is a short warm-up question meant to help you familiarize yourself with the coding workspace. Actual UI coding interview questions will be more complicated.
Make the text within the button display the number of times the button has been clicked.
This is a short question that only requires one state variable: the number of times the button has been clicked (count).
Declare count as a variable and attach a @click handler to the <button> that increments the count when the event is triggered.
<!doctype html><html><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><metaname="viewport"content="width=device-width,initial-scale=1.0" /><title>Vue</title></head><body><div id="app"></div><!-- Built files will be auto injected --></body></html>
console.log() statements will appear here.