Coder Social home page Coder Social logo

phase-1-control-flow-lab's Issues

Missing a range of numbers

Canvas Link

https://flatiron-staff.slack.com/archives/CR07X87PC/p1648592593158789?thread_ts=1648592229.650839&cid=CR07X87PC

Concern

Flagged by @mlgvla in Slack:

Hi - I just helped a student on the current phase-1-control-flow-lab, and noticed that it's missing a range of numbers. This is the current code:

function scuberGreetingForFeet (feet) {
  if (feet <= 400) {
    return 'This one is on me!';
  } else if (1999 < feet && feet < 2500) {
    return "I will gladly take your thirty bucks.";
  } else {
    return "No can do.";
  }
}

There is no condition in for numbers between 400 and 2000. If I were to pass in, say, 500, the it will say "No can do." I don't know, I certainly would take a rider who wanted to travel between 400 and 2000 feet - charge them, maybe $20 or something (based on these rates!)
Would it be possible to add this range to the deliverables and put in a testing condition for it? It might make the logic flow better to a student.

Additional Context

No response

Suggested Changes

No response

Test does not work when break is added to the switch statement.

Canvas Link

https://learning.flatironschool.com/courses/7741/assignments/278298?module_item_id=675984

Concern

To my knowledge, the break is a best-practice use for switch statements to ensure no unintended cases match. This test does not work for the switch if you include a break after each case, but it should still have the same outcome.

I may have a gap in my knowledge here, but I couldn't find anything in the coursework addressing this. If so, please let me know so I do not go on mistaken.

Additional Context

No response

Suggested Changes

No response

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.