Giter Site home page Giter Site logo

dominikschopper / palindrome-challenge Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3 KB

simple little challenge taken basically from freecodecamp.org and created a simple project around it

Home Page: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker

JavaScript 100.00%

palindrome-challenge's Introduction

simple palindrome challenge

please write complete the script given in ./src/palindrome.js so that it returns true if the word is a plindrome and false if it is not

the cases described below are tested in the palindrome.spec.js which can be run by npm test and should

Definition of a palindrome

any sequence of numbers or letters that contain the same letters or numbers read forward or reverse is considered a palindrome. Case of the letters do not matter

e.g.

  • abccba is a palindrome and palindrome('abccba') should return true
  • Racecar is a palindrome and palindrome('Racecar') should return true
  • 1221 is a plaindrome and palindrome('1221') should return true
  • 1234 is not a plaindrome and palindrome('1234') should return false
  • Whatever is not a plaindrome and palindrome('1234') should return false

a string is even considered a palindrome, even if spaces or any non-word characters are injected

  • Abc Cba is a palindrome
  • #!Race Car? is a palindrome
  • 1.221 is a palindrome
  • F#cking Gnikcf!!! is a palindrome
  • #qwe!!! is not a palindrome

use this project

  1. clone this project
  2. run npm install in the root directory
  3. happy coding
  4. run npm run test and see if some test fails, if yes, go back to 3. (or fix the tests ;)

palindrome-challenge's People

Watchers

James Cloos avatar dominikschopper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.