Skip to content

tsoriLache/JS-Basics-Exercises

Repository files navigation

JS exercises for syber4s course.

Each of the exercises is in a separate file:

29/8


30/8

  • You are given an array of a student's grades during the school year. Your task is to compute the following statistics: The range of the grades (difference between highest and lowest) The median grade (the grade in the middle) The range of the grades from the second half of the school year. The output of your code (what console.log prints) should be in the following format (notice the line-breaks and indentation): Stats: Range: 40 Median: 88 Half Range: 12 Separate your code into functions! Avoid code duplication!

31/8

  • Write a functions that plays city trivia:

       ```
       function guessCity(capital, coastal, famous, ancient) {
          // your code goes here
      }
      ```
    

The arguments are all true or false. The return value is the name of the city. Jerusalem is ancient, famous and a capital Tel Aviv is famous and coastal Acre is coastal and ancient Katzrin is ancient Zikim is coastal Musmus is not any of the above

About

29\8 assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published