# Does date value exist in array - can anyone please help?

**URL:** <https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809>\
**Category:** General\
**Created:** [April 23, 2024, 6:53pm UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809 "2024-04-23T18:53:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bazil](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Bazil](https://forum.freecodecamp.org/u/Bazil)\
**Post date:** [April 23, 2024, 6:53pm UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809/1 "2024-04-23T18:53:21Z")

</div>

I have two arrays each containing date objects.

Using a **For** loop I need to check whether the currently iterated value of ‘Array A’ exists in ‘Array B’.

I tried ‘includes’ however everything is returned as _false_.

Would greatly appreciate any help!  
Best regards

---

<div class="post-metadata">

**Author:** ![tobiaslanzic](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tobiaslanzic/32/320840_2.png) [@tobiaslanzic](https://forum.freecodecamp.org/u/tobiaslanzic)\
**Post date:** [April 23, 2024, 7:15pm UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809/2 "2024-04-23T19:15:14Z")

</div>

i don’t know if i can put here the code coded by chatgpt but i just copy and paste what you asked (everthing) and it did a full code, maybe can help you, i hope.

---

<div class="post-metadata">

**Author:** ![Bazil](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Bazil](https://forum.freecodecamp.org/u/Bazil)\
**Post date:** [April 23, 2024, 7:54pm UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809/3 "2024-04-23T19:54:33Z")

</div>

Sterling idea! It worked.  
Best regards and many thanks

---

<div class="post-metadata">

**Author:** ![Cody\_Biggs](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/cody_biggs/32/358652_2.png) [@Cody\_Biggs](https://forum.freecodecamp.org/u/Cody_Biggs)\
**Post date:** [April 23, 2024, 7:58pm UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809/4 "2024-04-23T19:58:44Z")

</div>

Please dont tell others to use ChatGPT, or provide code written by ChatGPT. It can be wildly inaccurate, and unless you are going through the code to make sure its right then you could potentially be causing more issues to someone’s code

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [October 23, 2024, 7:59am UTC](https://forum.freecodecamp.org/t/does-date-value-exist-in-array-can-anyone-please-help/686809/5 "2024-10-23T07:59:12Z")

</div>

Closed on October 23, 2024, 7:59am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
