async getAllMembers(id) {
try {
return await model.query('select * from `group_members` where `group_id` = ?', [id]);
} catch(e) {
return e;
}
}
function multiply(){
if( arguments.length === 0 ) {
return 0;
}
let calc = 1;
for(let i = 0, len = arguments.length; i < len; i++){
calc = calc * arguments[i];
}
return calc
}
function f(){};
if (f) {
alert(typeof(f));
}
let list = $('.list');
let url = list.data('url');
let lang = list.data('lang');
list.typeahead({
onSelect: function(item) {
console.log(item)
},
ajax: {
url,
data: {lang},
method: "post",
triggerLength: 1,
preDispatch: function(query){
return {name:query};
},
}
});
function Human(name) {
Human.country = 'USA';
this.name = name;
console.log('Имя: '+this.name);
console.log('Страна: '+Human.country);
}
let vasya = new Human('Вася');
let maria = new Human('Маша');