javascript-逗号的含义
有人可以帮助我理解以下两个示例中逗号的含义吗?
示例 1
$("#side-menu .nav-item").hover(
function () {
$(".enlarged #side-menu .nav-item").removeClass('mm-active');
$(".enlarged #side-menu .nav-second-level").removeClass('mm-show');
},
function () {
}
);
示例 2
App.prototype.initLayout = function () {
if (this.$window.width() >= 768 && this.$window.width() <= 1024) {
this.$body.addClass('enlarged');
}
else {
if (this.$body.data('keep-enlarged') != true) {
this.$body.removeClass('enlarged');
}
}
},
App.prototype.init = function () {
var $this = this;
this.initMenu();
$this.$window.on('resize', function (e) {
e.preventDefault();
$this.initLayout();
});
},
$.App = new App, $.App.Constructor = App