老师,请检查代码

来源:5-11 编程练习

勤劳学生

2020-04-09 12:24:55

<!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 date=new Date("2019-5-1");
	//分别输出年月日的值
   console.log(date.getFullYear());
   console.log(date.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回答

好帮手慕小尤

2020-04-09

同学写的很棒哦,符合题目要求。继续加油!

如果我的回答解决了你的疑惑,请采纳!祝学习愉快!

0

0 学习 · 9666 问题

查看课程