JS Bin
✓ Published0🌍 Public
JJn1532
Last edited Mar 8, 2017
Created on Mar 8, 2017
This example demonstrates two JavaScript array and string manipulation techniques: counting duplicate names in an array using the `reduce` method, and checking if two words are anagrams by sorting their lowercase, trimmed characters. The code logs results to the console, showing a counted object with name frequencies and a boolean `isAnagram` variable. It relies on native JavaScript functions like `toLowerCase`, `split`, `sort`, `join`, and `trim`, with no external visualization libraries. The dataset is a hardcoded array of names and two test words embedded directly in the script.
AI-generated description