JavaScript jQuery Basics Working with jQuery Collections The .each() method

Syntax problem?

I'm so, I making a syntax error?

<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" href="style.css">
    <h2>My Favorite Things</h2>

    <ul class="favorite-things">

    <script src="app.js"></script>
$('.favorite-things li').each(function() {
 $(this).prepend('<input type="checkbox"/>'); });

1 Answer

Steven Parker
Steven Parker
182,465 Points

You replicated the closing brace of the function, and the closing parenthesis (and semicolon) of the "each" call.

All of those were already provided by the challenge on the next line.