老师请检查
来源:5-11 编程练习
piii
2020-08-08 15:05:24
<!DOCTYPE html>
<html>
<head>
<title>运算符</title>
</head>
<body>
<script type="text/javascript">
//定义字符串hello,imooc!
var n="hello,imooc!";
//取出子串imooc并输出
console.log(n.substr(6,5))
//定义日期,值为2019-5-1
var n1=new Date("2019-5-1");
//分别输出年月日的值
console.log(n1.getFullYear());
console.log(n1.getMonth()+1);
//求一组数20,41,15,8的最大值和最小值并输出
console.log("最大值为:"+Math.max(20,41,15,8));
console.log("最小值为:"+Math.min(20,41,15,8));
</script>
</body>
</html>1回答
同学你好,同学写的很棒哦,符合题目要求。继续加油!
祝学习愉快