Javascript???????????
???????????? ???????[ 2013/11/6 10:25:09 ] ????????
?????????????????????????????£?
/**
* Add two numbers
*
* @param {Number} n1 The first number
* @param {Number} n2 The second number
* @return {Number} Sum of n1 and n2
*/
function add (n1?? n2) {
// arguments is an array of arguments passed
// So?? arguments.length is the number of arguments
if (arguments.length !== 2) {
throw new Error ();
}
return n1 + n2;
}
?????????????????????????????????С?
assert(add(1?? 4)?? 5) // true
assert(add(45??34??80)) // false
?????????????????????ζ?????????е??????????????????JS?й????????????????????????????к????????????????????????????????
?????????λ??????????Щ?????
????1.д??????????????ж?????С????????????????д????????????ж?????????????
????2.д?Щ???????ж??????????????
????· Object
????· String
????· Function
????· Boolean
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11