What does $([]) mean in jQuery
- by Sayem Ahmed
I have come across the following jQuery code but could not understand it. What does the following code, specially the "$([])" part in the last line mean ?
var instrument = $("#instrument"),
quantity = $("#quantity"),
orderType = $("#orderType"),
price = $("#price"),
validityDate = $("#validityDate"),
allFields = $([]).add(instrument).add(quantity).add(orderType).add(price).add(validityDate)