Each of the exercises is in a separate file:
- Write a piece of code that computes the sum of digits of a 3-digit number.
- Write a piece of code that finds the solutions for a quadratic equation.
- Write a piece of code that calculates the absolute value of a given number,WITHOUT using Math.abs (though you still can use other Math methods).
- 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!
-
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
- Formula 1 races are cool! and there have been many champions over the years. We want to find out how many times each of them won the races... for full description of the exercise go here--> https://github.com/tsoriLache/JS-Basics-Exercises/blob/main/formula%20exercise%20description.md