Code Monkey home page Code Monkey logo

codingjs's People

Contributors

davidrgriswold avatar the-winter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

codingjs's Issues

Adding a License

Thank you for putting this together. It's been helpful to be able to try the same exercises in Java and Python, thanks to Professor Nick Parlante of Stanford, and also being able to do those same exercises in JavaScript, thanks to the contributors here.

Would you mind adding a license to the repo? Thanks again!

firstHalf: wrong solution

firstHalf solution is the full string instead of half of it.

#24 was supposed to fix this but it looks like the bug is still present

Display solution on UI

there is no option on UI to compare the solution. It'll be great to have one link which can display the recommended solution.

findTheMedian incorrect solution

The prompt says to sort the array using .sort() as one should when trying to find the median of the array. However, the solutions provided are with the arrays being unsorted. The solution should first sort the array properly and then find the median as to be in line with the prompt.

Does not display "<" less than or ">" greater than signs within html.

The code needs to be slightly modified to appropriately display "<" less than or ">" greater than signs within the HTML. This issue seems to impact a few of the String exercises. The tests work properly; however, the example results do not appear correctly and can confuse folks. See the following string exercises:

makeTags: https://the-winter.github.io/codingjs/exercise.html?name=makeTags&title=String-1
Appears like:

makeOutWord('<<>>', 'Yay') → <>
makeOutWord('<<>>', 'WooHoo') → <>
makeOutWord('[[]]', 'word') → [[word]]

Should appear like:

makeOutWord("<<>>", "Yay") → "<<Yay>>"
makeOutWord("<<>>", "WooHoo") → "<<WooHoo>>"
makeOutWord("[[]]", "word") → "[[word]]"

makeOutWord: https://the-winter.github.io/codingjs/exercise.html?name=makeOutWord&title=String-1
Appears like:

makeTags('i', 'Yay') → Yay
makeTags('i', 'Hello') → Hello
makeTags('cite', 'Yay') → Yay

Should appear like:

makeTags("i", "Yay") → "<i>Yay</i>"
makeTags("i", "Hello") → "<i>Hello</i>"
makeTags("cite", "Yay") → "<cite>Yay</cite>"

To fix this, I would set these values equal to .textContent as opposed to .innerHTML. Or you could do a replace with HTML entities: .replace('<','&lt;').replace('>','&gt;')

String-1 -- firstHalf

This problem has a bug. To pass it the only thing that one needs is to return str. Also, the instructions are wrong.
String1-firstHalf

withoutString wrong solution

Hi all, I noticed the provided solution for String-3 -- withoutString is incorrect

It preserves only a single space in between matches when it should preserve all spaces. For example:

withoutString("This is a FISH", "IS") returns "Th░a░FH" (length 7) when it should return "Th░░a░FH" (length 8)

💡 spaces replaced by ░

This RegEx approach then doesn't pass all the tests in CodingJS, but the same approach in Java does in CodingBat.com

function withoutString(base, remove){
  let reg = new RegExp(remove, 'gi')
  return base.replace(reg, '')
}

The same approach in Java in the Official CodingBat String-3 > withoutString

public String withoutString(String base, String remove) {
  return base.replaceAll("(?i)" + remove, "");
}

Is this project active? I could submit a PR for this. I'm also interested in becoming a longer term contributor as some of my students use your website.

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.