Task: Declare a constant variable,PI , and assign it the value Math.PI. You will not pass this challenge unless the variable is declared … Read more
Category: 10 Days of Javascript
Day 1: Functions (10 Days of Javascript)
Task: Implement a function named factorial that has one parameter: an integer,n . It must return the value of n! (i.e., n factorial). Solution:
Day 1: Arithmetic Operators (10 Days of Javascript)
Task: Complete the following functions in the editor below: getArea(length, width): Calculate and return the area of a rectangle having sides length and width. getPerimeter(length, … Read more
Day 0: Data Types (HackerRank – 10 Days of Javascript)
Task: Variables named firstInteger, firstDecimal, and firstString are declared for you in the editor below. You must use the operator to perform the … Read more
Day 0: Hello, World! (HackerRank – 10 Days of Javascript)
Task: A greeting function is provided for you in the editor below. It has one parameter, parameterVariable. Perform the following tasks to complete … Read more