SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 313 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 18 Nov 2017 My Price 8.00

function takes two parameters, and the second parameter

plz help me modified my code.

  1. Inside lab3.js, you will export a class named lab3. In this class you will implement the following functions: 
  2. testDefaultParamtersThe function takes two parameters, and the second parameter is defaulted to 100 
  3. The function returns a json object containing two attributes: 'first' and 'second'The 'first' attribute of the return object is defined as the first parameter of the function
  4. The 'second' attribute of the return object is defined as the second parameter of the function
  5. testTemplateLiteralsThe function takes three parameters, a firstName, middleName, and lastName
  6. The function returns a string with the three parameters separated by commasThe parameters should be concatenated using ES6 string templates, not ES5 string addition!
  7. testMultilineStringsThe function takes no parameters
  8. The function returns a multi-line string that is at least 4 lines longThe content of the string is up to you!
  9. testSortWithArrowFunctionThe function takes an array of numbers as a parameter
  10. The function returns the array sorted with a custom comparator that sorts the numbers descending
  11. Use the .sort function of the array and pass in a custom comparatorThe comparator should be implemented as an arrow function using ES6 syntax

 

class lab3{

    function testDefaultParamters(a,b=100){
      return  json={
      'first':a
         'second':b
};
}

    function testTemplateLiterals(firstName,middleName,lastName){
      return myName='${firstName},${middleName},${lastName}';
}
    function testMultilineStrings{
  return
   mySpell= `Uh-bare-toe.
   AK-ee-oh.
   AH-gwah-MEN-tee.
   A-LAR-tey.`;
}

function testSortWithArrowFunction(a){
 return a.sort((m,n)=>n-m);
}

}
export {lab3}

Answers

(5)
Status NEW Posted 18 Nov 2017 01:11 PM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)