Comparison with the Greater Than Operator-sublime

Tell us what’s happening:

Your code so far

  function testGreaterThan(val) {
    if (val > 100) {  // Change this line
      return "Over 100";

    if (val >10) {  // Change this line
      return "Over 10";

    return "10 or Under";

  // Change this value to test

I’m trying to type the same code in sublime text 3 windows and I don’t see the desired result.It juts displays [Finished in 0.2 seconds].

You’re not seeing the result because you’re not outputting the result anywhere

In the browser console you see the result of any expression you type echoed afterwards, but when running things in node or otherwise, you only see things you output

So in your case, you’re wanting to change testGreaterThan(11); to console.log(testGreaterThan(11));

1 Like