Skip to content
Sign UpLog In
Profile icon

tymergoss

@tymergoss
Repls
Community
tymergoss
tymergoss
shared a Post
2 years ago
Getting Highest Population and Lowest Population
Keep getting a reference error stating "highestPopulation is not defined at run. The goal of the assignment is to use function printAndGetHighScore to
census-2021-02-25-19
Node.js
19wintersp
19wintersp
On line 72 of "census.1.js", you're referencing the variable highestPopulation, which is not defined in that scope. If you want to get the value computed and returned in the function printAndGetHighScore, you should call it (and pass the statePopulationList as a parameter): console.log("highest population value is: " + printAndGetHighScore(statePopulationList)); `2 years ago
tymergoss
tymergoss
shared a Post
2 years ago
https://repl.it/join/guzonkcv-tymergoss I've tried everything I can think of. Searched around the web to try and locate a solution. Everything I try
phrase-o-matic-2021-02-18-21
Node.js
Coder100
Coder100
did you just copy and paste code lol That's not valid syntax, you must actually have the variable like this: var b = "apple"; console.log("a" + b); Here's the working code: function makeInsult() { var words1 = ["artless", "bootless", "clouted", "clouted", "errant"]; var words2 = ["beef-witted", "dismal-dreaming", "fat-kidneyed", "half-faced", "tickle-brained"]; var words3 = ["barnacle", "death-token", "foot-licker", "measle", "varlot"]; var rand1 = Math.floor(Math.random() * words1.le2 years ago
tymergoss
tymergoss
my syntaxerror is appearing in my insult-o-matic.1.js file when you open the shell. Once you type in "dir" then "node insult-o-matic.1.js" the syntaxerror appears. 2 years ago