Skip to content

Instantly share code, notes, and snippets.

@zephyr-dev
Created August 10, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zephyr-dev/a7158c15831e86ec226e to your computer and use it in GitHub Desktop.
Save zephyr-dev/a7158c15831e86ec226e to your computer and use it in GitHub Desktop.
Dakarai homework 3

Dakarai Homework 3

  1. Write a function called pallindrome? that returns true or false. The function should take one string parameter (word). Return true if word is equal to itself backwards. For example: palindrome?("the") should return false. palindrome?("racecar") should return true.
  2. Write a function called anagrams? that returns true or false. The function should take two string parameters (word1, word2). Return true if word1 and word2 are anagrams of one another. An anagram of a word is another word that has the same letters in a different order. For example: anagrams?('god', 'dog') should return true. anagrams?('aabb', 'ab') should return false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment