01—Hbuilder—js—除法、取餘數

做夢吃星星發表於2020-10-23
	<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>哐一下,你就知道</title>
		<link rel="shortcut icon" href="//www.baidu.com/favicon.ico" type="image/x-icon"/>
	</head>
	<body>
	</body>
</html>
<script type="text/javascript">
	var a = prompt("今年多大了?")
	console.log(a);
	/*判斷變數a的型別*/
	console.log(typeof a); 
	/*除法*/
	console.log(6/3.14);
	/*取餘數*/
	console.log(3%4);
	console.log(5%4);
</script>

相關文章