Hi,
Anyone have an idea why this won’t work?
I am just trying to get the data from my object to use in app.js, and I do not get and do not get something loggede to the console?
App.js
import {redDeck} from './redDeck.mjs';
alert(redDeck.Card1.name);
body.onload = function test(){
console.log(redDeck.Card1.name);
}
redDeck.mjs
var redDeck = {
Card1 : {
name : "Amoured Troll",
price : 2,
attack : 1,
health : 3,
special : "Taunt"
}
}
export default redDeck;