Giter Site home page Giter Site logo

Comments (9)

skatcat31 avatar skatcat31 commented on July 17, 2024 1

The one you've submitted in the PR seems to be working. I want to do some more in depth tests when I have some time or if you'd like to submit some tests for it in the PR as a comment on the thread I'd be more than happy to look it over. Either way, this is a helpful find!

from 30-seconds-of-interviews.

skatcat31 avatar skatcat31 commented on July 17, 2024 1

right never reported test results did I... yeah it's working in all cases. Never found an edge case that could be considered a problem except for a SO if I went deep with auto generating object references

from 30-seconds-of-interviews.

flxwu avatar flxwu commented on July 17, 2024

Please open a PR with the proposed change in the answer's code sample. Thanks! 😊

from 30-seconds-of-interviews.

skatcat31 avatar skatcat31 commented on July 17, 2024

i'm going to reopen this to allow for easier discussion from #100

from 30-seconds-of-interviews.

skatcat31 avatar skatcat31 commented on July 17, 2024

Are you saying this error or that it returns true with 1 and 2 used as arguments?

from 30-seconds-of-interviews.

chenjigeng avatar chenjigeng commented on July 17, 2024

yes.and it will return true with { a:1 } amd { a: 2} used as arguments.The code can't work.

from 30-seconds-of-interviews.

skatcat31 avatar skatcat31 commented on July 17, 2024

This is a confirmed problem. We might need to add better handling for this.

Or we could just use JSON.stringify(a) === JSON.stringify(b) as a short and sloppy...

But like I said it's sloppy and only really applies to POJO(Plain Old JavaScript Object)

from 30-seconds-of-interviews.

chenjigeng avatar chenjigeng commented on July 17, 2024

We can solve it by adding a if statement.You can see my code above.

from 30-seconds-of-interviews.

fejes713 avatar fejes713 commented on July 17, 2024

@chenjigeng thanks for noticing this. The PR is merged. ❤️

from 30-seconds-of-interviews.

Related Issues (20)

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.