JSFiddle - React, Tailwind, and code Playground
by Wentz Wu
JavaScript
var defaults = {
dataSource: {
url: "/api/customer",
schema: {
model: {
fullName: "string",
birthtday: "date"
}
}
},
columns: [{
field: "fullName",
title: "Full Name"
}, {
field: "birthday",
title: "Birthday"
}]
};
var options = {
dataSource: {
url: "/dataService/getCustomer"
},
sortable: {
model: "single"
}
}
var result = $.extend(true, {}, defaults, options);
var json = JSON.stringify(result);
alert(json);
var n = [1,2,3,4,5];
var n2 = $(n).filter(function(){
return this%2 == 0;
});
console.log(n2);