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
Category: 10 Days of Javascript
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
Day 2: Conditional Statements: Switch (10 Days of Javascript)
Task: Complete the getLetter(s) function in the editor. It has one parameter: a string, , consisting of lowercase English alphabetic letters (i.e., a through z). It … Read more
Day 2: Conditional Statements: If-Else (10 Days of Javascript)
Task: Complete the getGrade(score) function in the editor. It has one parameter: an integer,score, denoting the number of points Julia earned on … Read more