Having difficulty creating a variable and setting it equal to a boolean


#1

https://www.codecademy.com/courses/learn-javascript/lessons/variables/exercises/create-a-variable-ii?action=lesson_resume

var hasPet = 'false';
console.log(hasPet);


Replace this line with your code.


#2

Don't store the boolean false as a string 'false' just write var hasPet = false;


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.