Convert scalar variable to array containing variable in javascript
<p>How would one convert <code>5</code> to <code>[5]</code> in JavaScript?
I have a method that uses jQuery's <code>$.inArray</code> and I would like it to work if someone just passes in a scalar variable by converting to an array with one entry, which would be the scalar.</p>
