# Unit 5: Lesson 8: Bubble 4

**URL:** <https://forum.code.org/t/unit-5-lesson-8-bubble-4/25460>\
**Category:** CS Principles\
**Tags:** csp-unit-5, csp-unit-5-lesson-8\
**Created:** [March 11, 2019, 5:08am UTC](https://forum.code.org/t/unit-5-lesson-8-bubble-4/25460 "2019-03-11T05:08:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn.crane](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@glenn.crane](https://forum.code.org/u/glenn.crane)\
**Post date:** [March 11, 2019, 5:08am UTC](https://forum.code.org/t/unit-5-lesson-8-bubble-4/25460/1 "2019-03-11T05:08:42Z")

</div>

I understand that the comparison using operators underneath the line (line 15 and below) are not typical comparisons.

I am however wondering if the use of greater than and less than appearing false is just as the data types do not match (String \< Integer etc). Is there anyway where those comparisons do/would work?

---

<div class="post-metadata">

**Author:** ![gjschmidt](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/gjschmidt/32/4922_2.png) [@gjschmidt](https://forum.code.org/u/gjschmidt)\
**Post date:** [March 11, 2019, 11:59pm UTC](https://forum.code.org/t/unit-5-lesson-8-bubble-4/25460/2 "2019-03-11T23:59:27Z")

</div>

You are correct in that the type mismatch causes the condition to be false. Beyond the scope of this course is string conversion. The following would both evaluate to true:

var num = 3;  
var n = num.toString();  
console.log(n==“3”);

var otherNum = parseInt(“3”);  
console.log(otherNum==3);
