How to split multiple event handles in jQuery?

Trying to figure out how to split the multiple events in a new line to make the code below cleaner.

    'click dblclick mousedown mousemove mouseout mouseover mouseup mousewheel keydown keypress keyup textInput touchcancel touchend touchmove touchstart blur change focus reset resize select scroll submit zoom',

function testConsole() {
    console.log(' test');

How can I make this code cleaner? Now I have a single line with all events which I want to handle, is it possible to put this in an array or something else to make it readable?


You can create events with array and then join with space. check below code.

var events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'mousewheel', 'keydown', 'keypress', 'keyup', 'textInput', 'touchcancel', 'touchend', 'touchmove', 'touchstart', 'blur', 'change', 'focus', 'reset', 'resize', 'select', 'scroll', 'submit', 'zoom'];

events = events.join(" ");


function testConsole() {
    console.log(' test');
<script src=""></script>