Skip to content

Instantly share code, notes, and snippets.

@BeKnowDo
Created June 12, 2017 18:41
Show Gist options
  • Select an option

  • Save BeKnowDo/f2e044858bf2c3b14ab7841f24f9ffb1 to your computer and use it in GitHub Desktop.

Select an option

Save BeKnowDo/f2e044858bf2c3b14ab7841f24f9ffb1 to your computer and use it in GitHub Desktop.

Revisions

  1. Cesar Perez created this gist Jun 12, 2017.
    6 changes: 6 additions & 0 deletions palindrome.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    function palindrome(string) {
    let reverseString = string.split('').reverse().join('')
    return reverseString === string
    }

    document.querySelector('#test').innerHTML = palindrome('level')