Learn Basic JavaScript by Building a Role Playing Game - Step 130

Tell us what’s happening:

i was asked to multiply the result of those multiplication using math.floor . but it throws error…

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function defeatMonster() {
gold += math.floor((monsters[fighting].level) * 6.7);
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 130

Math has a capital M. It should pass if you fix that.

2 Likes