Task: Complete the function in the editor. It has one parameter: an array, nums. It must iterate through the array performing … Read more
Category: HackerRank
Day 5: Template Literals (10 Days of Javascript)
Task: The code in the editor has a tagged template literal that passes the area and perimeter of a rectangle … Read more
Day 5: Inheritance (10 Days of Javascript)
Task: We provide the implementation for a Rectangle class in the editor. Perform the following tasks: Add an area method to Rectangle‘s prototype. Create a Square class … Read more
Day 4: Classes (10 Days of Javascript)
Task Create a Polygon class that has the following properties: A constructor that takes an array of integer values describing the lengths of the … Read more
Day 4: Count Objects (10 Days of Javascript)
Task: Complete the function in the editor. It has one parameter: an array,a , of objects. Each object in the array … Read more
Day 4: Create a Rectangle Object (10 Days of Javascript)
Task: Complete the function in the editor. It has two parameters: a and b. It must return an object modeling a rectangle that … Read more
Day 3: Throw (10 Days of Javascript)
Task: Complete the isPositive function below. It has one integer parameter, . If the value of is positive, it must return the string YES. Otherwise, … Read more
Day 3: Try, Catch, and Finally (10 Days of Javascript)
Task Complete the reverseString function; it has one parameter, s. You must perform the following actions: Try to reverse string s using the split, reverse, and join methods. If an … Read more
Day 3: Arrays (10 Days of Javascript)
Task: Function Description Complete the getSecondLargest function in the editor below.getSecondLargest has the following parameters: int nums[n]: an array of integers Returns int: the second … Read more
Day 2: Loops (10 Days of Javascript)
Task: First, print each vowel in s on a new line. The English vowels are a, e, i, o, and u, and each vowel must be printed in the … Read more