<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function a() {
        alert(1);
        return 2;
        alert(3);
    }

    console.log(a());
    // 一旦执行了return
</script>
</body>
</html>