I think this code block should better read:
function myChildren(name) {
if (name == "Dave") {
return "Oldest";
}
else if (name == "Michelle") {
return "Middle";
}
else {
return "Not my kid!";
}
}
Identing your code correctly is the first thing to do when you want to quickly detect misplaced braces.
You should also try to be consistent with the way you are using if blocks. For the two first ones, you do not use braces, whereas you use them for the else part.
I also corrected your equality tests; as far as I know, conditional operator in javascript is
==
, not
=
.
=
is the assignment operator.
Hope this helps.