Question: jQuery can create event handlers that execute exactly once. How is this done?
- `$('button').click(function() { console.log('this will only happen once'); }, false);`
- `$('button').on('click', function() { console.log('this will only happen once'); }).off('click');`
- `$('button').once('click', function() { console.log('this will only happen once'); });`
- `$('button').one('click', function() { console.log('this will only happen once'); });`
Answer: The correct answer of the above question is Option D:`$('button').one('click', function() { console.log('this will only happen once'); });`