「JavaScript」再帰関数を利用するサンプル

サンプルコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<script>
function demo() {
console.log("welcome to study");
setTimeout(function(){
demo();
},1000);
}
demo();
</script>
<script> function demo() { console.log("welcome to study"); setTimeout(function(){ demo(); },1000); } demo(); </script>
<script>
        function demo() {
            console.log("welcome to study");
            setTimeout(function(){
                demo();
            },1000);
        }
        demo();
    </script>

 

JavaScript

Posted by arkgame