利用数组求两个数的加减乘除
程序员文章站
2022-06-24 22:26:20
...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function max (name1 ,name2 ){
return[name1+name2 , name1-name2 , name1*name2, name1/name2]
}
var a= max(1,1)
console.log(a);
</script>
</body>
</html>
1