函数return之后,return后面的语句就不会再执行了
作用:将函数内部的值返回到外部
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/*
函数return之后,return后面的语句就不会再执行了
作用:将函数内部的值返回到外部
*/
function go(){
return "hellow world";
console.log("good")
}
console.log(go())
</script>
</body>
</html>