JSFiddle - React, Tailwind, and code Playground

by kpripper

JavaScript

function countSheep(num) { 
    var count = "";
    let i = 1;
    while (i <= num) {
        count = count + i + " sheep...";
        i++;
    }
    return count;
}

console.log(countSheep(2));