Previous slide 2 (9/12)


I have looked my code over and compared it to others, I am still getting these Error Messages:

Oops, try again. Remember to fade out the current slide and remove the 'active-slide' class.
SyntaxError: expected expression, got ')'

Here is my code:

var main = function(){

$('.arrow-next').click(function() {
var currentSlide = $('.active-slide');
var nextSlide =;

var currentDot = $('.active-dot');
var nextDot =;

if(nextSlide.length == 0) {
nextSlide = $('.slide').first();
nextDot = $('.dot').first();



$('.arrow-prev').click(function() }
var currentSlide = $('.active-slide');
var prevSlide = currentSlide.prev();

if(prevSlide.length == 0) {
prevSlide = $('.slide').last();





I can't figure out if it is a bug or I am missing something...


Hi Heather,

You've got a few problems, but they're all easily fixed :)

  • Line 17 should contain only a closing curly brace (}) and a semi-colon (;), nothing else
  • Line 24 needs to have });
  • Line 25 is your main problem, you accidentally used a closing curly brace instead of an opening curly brace ({)
  • Line 31, you need to remove the closing parenthesis ())

I hope this helps!
Please let me know if you're still not being passed :)


Face-palming myself for the closing curly brace. That worked perfectly, thanks for the extra eyes!!


No problem, I'm always glad to help!


Could you by chance post the new corrected code? I am having a horrible time with this one. Thank you!


Hi @betarunner06338,

Posting code solutions in the forums isn't allowed. If you'd like help, please create a new forum topic with your code, a link to the exercise you're on, and the error message you're getting, and someone will help you over there :)


I apologize, I did not know. I created a new forum. Any quick input would be awesome!


@betarunner06338 Thank you for doing that, I'm a bit busy right now, but I'll help you as soon as I can if someone else doesn't first - It won't be long before I can help you, though :)


Okay sounds good thank you