Questions & AnswersJava Programming

Using Javascript:   We need a function fixEmail(email) . The...

Question
Answered step-by-step
Asked by m_a_l_t on coursehero.com

Using Javascript:   We need a function fixEmail(email) . The...

Using Javascript:

 

We need a function fixEmail(email). The function takes a live email address (e.g., "..l@movie.ca") and returns a new string with the following fixes applied:

 

  • Leading/Trailing whitespace removed
  • Any Capitalization of the @Movie.ca portion is removed (must be all lower case)
  • Any Capitalization of the username is left as is (don't change it)

fixEmail(" S..l@Movie.ca ") would return "..l@movie.ca"

Answer & Explanation

Solved by verified expert
Answered by ckravina65 on coursehero.com

sectetur adipiscing elit.

sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipisci
CliffsNotes Logo

Unlock access to this and over
10,000 step-by-step explanations

Unlock Explanation

Have an account? Log In

<p>sectetur adipiscing elit.</p>sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipisci

Step-by-step explanation

sectetu

sectetur adipiscing elit.
sectetur adipiscing el
sectetur adipiscing elit. Nam lacinia pulvi
sectetur adipiscing elit. Nam l
sectetur adipiscing elit. Nam
s

sectetur adipiscing

sectetur adipiscing elit. Nam
sectetur adipiscing elit. Nam lac
sectetur adipiscing elit.
sectetur adipiscing elit.

sectetu

 

sectetu

 

sectetu

Get unstuck with a CliffsNotes subscription

Example CliffsNotes Question and Answer
Unlock every step-by-step explanation, download literature note PDFs, plus more.Get Access

Related Q&A