Skip to content

Instantly share code, notes, and snippets.

@alifma
Created September 25, 2024 12:38
Show Gist options
  • Save alifma/1e2937639afdb2bc12583e4ac1c4787d to your computer and use it in GitHub Desktop.
Save alifma/1e2937639afdb2bc12583e4ac1c4787d to your computer and use it in GitHub Desktop.

Revisions

  1. alifma created this gist Sep 25, 2024.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    function charFrequency(str) {
    // implementasi
    }

    console.log(charFrequency("hello world"));
    // output: { h: 1, e: 1, l: 3, o: 2, ' ': 1, w: 1, r: 1, d: 1 }