Skip to content

Instantly share code, notes, and snippets.

@compscitwilight
Created September 5, 2022 03:10
Show Gist options
  • Select an option

  • Save compscitwilight/52fa99e0cfa8a15b1a23ddb354fd0083 to your computer and use it in GitHub Desktop.

Select an option

Save compscitwilight/52fa99e0cfa8a15b1a23ddb354fd0083 to your computer and use it in GitHub Desktop.

Revisions

  1. compscitwilight created this gist Sep 5, 2022.
    10 changes: 10 additions & 0 deletions progressBar.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    const max = 10

    function CreateProgressBar(progress: number) {
    if (progress > max) {
    console.log(`Progress bar is out of range of ${max}`)
    return
    }
    const progressBar = `${"🟩".repeat(progress)}${"⬛".repeat(max - progress)}`
    return progressBar
    }