Question: jQuery can create event handlers that execute exactly once. How is this done?

  1. `$('button').click(function() { console.log('this will only happen once'); }, false);`
  2. `$('button').on('click', function() { console.log('this will only happen once'); }).off('click');`
  3. `$('button').once('click', function() { console.log('this will only happen once'); });`
  4. `$('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'); });`