javascript , .
, , , . , .
:
function abc(s, t) {
if (t !== undefined) {
console.log('was called as abc(s,t)');
} else {
console.log('was called as abc(s)');
}
}
abc('1');
abc('1', '2');
, ( ).
, jQuery .css() .
.css( propertyName )
.css( propertyNames )
.css( propertyName, value )
.css( propertyName, function(index, value) )
.css( properties )
.css() , , , , , .
, , , 5 :
css: function(prop, value) {
if (value === undefined) {
if (typeof prop === "string") {
} else if (Array.isArray(prop)) {
} else if (typeof prop === "object") {
}
} else {
if (typeof value === "function") {
} else {
}
}
}
. , jQuery .hide() . - .hide( [duration ] [, complete ] ), , . , . :
hide: function(duration, fn) {
duration = duration || 0;
fn = fn || function() {};
}
, , , , , , - . , javascript .add() :
s.add(key)
s.add(key1, key2, key3)
s.add([key1, key2, key3])
s.add(key1, [key8, key9], key2, [key4, key5])
s.add(otherSet)
s.add(arrayLikeObject)
, , . , , , - . , , .
, GitHub , .