scrimba
Create an RPG game - Rob Sutcliffe
Add Character Constructor
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Add Character Constructor
by
AboutCommentsNotes
Add Character Constructor
by
Expand for more info
index.js
run
preview
console
import characterData from "./data";
import { getDiceRollArray, sumArray } from "./utils";

// create a Character constructor function
// this will add all the data for the hero character (elementId, name, emoji, health, diceCount)
// then create a new character using characters.hero and console.log the hero name
Console
ReferenceError: Character is not defined (/index.js:10)
,
/index.html
-2:13