13. Not



SyntaxError: Unexpected token }

var programming = false// Declare your variables here!

var happy = function() {
  if (


You haven't finished your if (...) statement...?


I don't understand the instructions for the if statement


if statements;

if (this is true) {
 //this will be run
else if (this is true) {
  //this will be run
else {
    //this will be run


i don't understand??


the basic if statement is written like this

if(This is true) {
//do this
} else {
// do this other thing

if that doesn't help then I would suggest going back and reading about the if statement

  1. Create a variable called programming
  2. Create a function called happy() with no parameters,
  3. Inside the function's {}, create an if/else statement, where you return true if programming is false, and false otherwise.

Here's part of it, figure the rest out yourself:

if () {
  return true;
else {
  return false;


I'm stuck on the same part

// Declare your variables here!
var programming = false

var happy = function() {
  // Add your if/else statement here!
if (programming === false) {
    return !false
} else {
    return !true

like the Not statement part so here is my code


I'm also trying to help with the if statement


i still am stumped


write the if statement like how it was in the part before the dragon slayer


i cant find it :angry: :angry:


Your if statement should returns true when programming equals to false. Why did you use so difficult logic? Just do what instruction says:

happy returns true if programming is false and false otherwise

And did you call function happy()?


You're returning the wrong things. Remember, putting an exclamation point ! infront of something means "not -", so !true is false etc.


I past it. and Code your own adventure 2! :relaxed: :relaxed:


I don't think I remember how?


To call function just type:



here's my code

// Declare your variables here!
var programming = !false

var happy = function() {
// Add your if/else statement here!
if (programming == false) {
return false
} else {
return true
happy(programming == !false ||!true);

and here's what is being logged

SyntaxError: Unexpected end of input

  1. You didn't close your function happy().
  2. Function happy() doesn't have any parameters, so you need to call this fuction without any arguments:



just sayin'
Never mind. You got it.