Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
How to solve the malformed arrow value error?

I have this function:

const removeChatTyping = (data) => {
    getTypingMessages(data).fadeOut(function () {
      $(this).remove();
    });
  }

I don't need the "fadeout" part so I took it out like this:

const removeChatTyping = (data) => {
    getTypingMessages(data) => {
      $(this).remove();
    };
  }

but I get an error that says malformed arrow. How can I take the fade out part smoothly?

I'd appreciate any answers that can lead me to solve this.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want to remove it immediately when the function is called, then you don't need a callback (or attempted callback), just call .remove() immediately.

const removeChatTyping = (data) => {
    getTypingMessages(data);
    $(this).remove();
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!