javascript - how to use var properly -
i started learning javascript on codecademy , don't know problem code.
var feedback = prompt("rate game out of 10"); if(feedback > 8) { console.log("this beginning of game empire. stay tuned more!"); } else { console.log("i slaved away @ game , gave me score?! nerve! wait!") }; it says there's wrong variable. might easy question, don't know how figure out.
the issue klaasman pointed out, had newline break.
console.log("this long string went more 1 line long"); if want strings go more 1 line have use \ tell javascript "the string continued on next line"
console.log("this long string \ went more 1 line long"); this way write same string this:
console.log("this \ \ \ \ long \ string"); you forgot semicolon on last console.log statement.
Comments
Post a Comment