SOURCE

console 命令行工具 X clear

                    
>
console
function draw(){
    const ctx = document.getElementById('canvas').getContext('2d')
    const img = new Image()
    img.src = 'https://mdn.mozillademos.org/files/5397/rhino.jpg'
    img.onload = ()=>{
        for(let i=0;i<3;i++){
            for(let j=0;j<2;j++){
                ctx.drawImage(img,i*100,j*75, 100,75)
            }
        }
    }
}


draw()
<canvas id="canvas"></canvas>