Function 2: Move Capital Letters Create a JavaScript Arrow function that meets the following requirements: • Authored us

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Function 2: Move Capital Letters Create a JavaScript Arrow function that meets the following requirements: • Authored us

Post by answerhappygod »

Function 2: Move Capital LettersCreate a JavaScript Arrow function that meets the followingrequirements:• Authored using arrow expression syntax (constant name_moveCapitalLetters)• That takes in a string parameter, of mixed casing (mix of upperand lowercase letters)• The function moves all capital letters to the front of aword.• The uppercase letters moved to the front, maintain their originalrelative order• The lowercase letters moved to the back front, maintain theiroriginal relative order• Console log output is NOTpermitted.• The function should pass each of the illustrated examples belowat a minimum._moveCapitalLetters("hApPy") ➔ "APhpy"_moveCapitalLetters("moveMENT") ➔ "MENTmove"_moveCapitalLetters("shOrtCAKE") ➔ "OCAKEshrt"
Function 3: Repeating CharactersCreate a JavaScript Arrow function that meets the followingrequirements:• Authored using arrow expression syntax (constant name_repeatingCharacters)• That takes in a string• The function returns the first character that repeats• If there is no character that repeats, return -1• The function should be case sensitive (ex: "I" not equal to"i")• Console log output is NOT permitted.• The function should pass each of the illustrated examples belowat a minimum._repeatingCharacters("legolas") ➔ "l"_repeatingCharacters("Gandalf") ➔ "a"_repeatingCharacters("Balrog") ➔ "-1"_repeatingCharacters("Isildur") ➔ "-1"
Function 4: Capitalize First Letter of Each WordCreate a JavaScript function expression that meets the followingrequirements:• Authored using function expression syntax (with constant name_capitalizeFirstLetter)• That takes in a string as an argument• The function converts first character of each word touppercase• The function returns the newly formatted string• Console log output is NOT permitted.• The function should pass each of the illustrated examples belowat a minimum._capitalizeFirstLetter("This is a title") ➔ "This Is A Title"_capitalizeFirstLetter("capitalize every word") ➔ "Capitalize EveryWord"_capitalizeFirstLetter("I Like Pizza") ➔ "I Like Pizza"_capitalizeFirstLetter("PIZZA PIZZA PIZZA") ➔ "PIZZA PIZZAPIZZA"
Function 5: Remove DuplicatesCreate a JavaScript function expression that meets the followingrequirements:• Authored using function expression syntax (with constant name_removeDuplicates)• That takes an array of items (numbers or strings) asargument• The function removes all duplicate items in the array• The function returns a new array in the same sequential order asthe original source array (minus the duplicates)• Console log output is NOT permitted.• The function returns an array containing the array groupings backto the caller._removeDuplicates([1, 0, 1, 0]) ➔ [1, 0]_removeDuplicates(["The", "big", "cat"]) ➔ ["The", "big","cat"]_removeDuplicates(["John", "Taylor", "John"]) ➔ ["John","Taylor"]
Procedure and RulesPlease ensure to remove all instances of the following from yourfinal submission solution:• document.write()• innerHTML()• alert()• any commented code• Do not over use the console log, spamming the console logunnecessarily, say for example. with debug related output may costyou marks.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply