Sort by

recency

|

69 Discussions

|

  • + 0 comments
    function getArea(length, width) {
        let area;
        area = length * width;
        return area;
    }
    
    function getPerimeter(length, width) {
        let perimeter;
        perimeter = 2 * (length + width);
        return perimeter;
    }
    
  • + 0 comments
    function getArea(length, width) {
        let area;
        // Write your code here
        area = Number(length) * Number(width);
        return area;
    }
    
    function getPerimeter(length, width) {
        let perimeter;
        // Write your code here
        perimeter=2*(Number(length)+Number(width));
        return perimeter;
    }
    
  • + 0 comments
    const getArea = (length, width) => length * width;
    
    const getPerimeter = (length, width) => 2*(length+width);
    
  • + 0 comments
    /**
    *   Calculate the area of a rectangle.
    *
    *   length: The length of the rectangle.
    *   width: The width of the rectangle.
    *   
    *	Return a number denoting the rectangle's area.
    **/
    function getArea(length, width) {
        let area;
        area = length * width;
        return area;
    }
    
    /**
    *   Calculate the perimeter of a rectangle.
    *	
    *	length: The length of the rectangle.
    *   width: The width of the rectangle.
    *   
    *	Return a number denoting the perimeter of a rectangle.
    **/
    function getPerimeter(length, width) {
        let perimeter;
        perimeter = 2*(length + width);
        return perimeter;
    }
    
  • + 0 comments

    function getArea(length, width) { let area; area = length * width; return area; }

    function getPeriemeter(length, width) { let periemter; periemeter = length *2 + width*2; return periemeter; }

    return area;
    

    }