You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey , i just started web dev and an course on udemy requires us to use your 2 modules superheroes and supervillains
i tried implementing on by one in my code and they work fine
but if i try to implement both insame code i am getting errors
my code :
`
const supervillains = require('supervillains');
const superheroes = require('superheroes');
var mySVillain = supervillains.random();
var mySVHero = superheroes.random();
console.log(mySVillain+" vs "+superheroes);
`
and i am getting this error: Mortalla vs [object Object]
the superhero name is being printed as [object object] even if i try to print them individually
Is there something wrong with my code or something else ?
Thanks for reading
edit : found my mistake , i was console logging superheroes instead of my var name i.e. SVHero 😅
The text was updated successfully, but these errors were encountered:
Hey , i just started web dev and an course on udemy requires us to use your 2 modules superheroes and supervillains
i tried implementing on by one in my code and they work fine
but if i try to implement both insame code i am getting errors
my code :
`
const supervillains = require('supervillains');
const superheroes = require('superheroes');
var mySVillain = supervillains.random();
var mySVHero = superheroes.random();
console.log(mySVillain+" vs "+superheroes);
`
and i am getting this error:
Mortalla vs [object Object]
the superhero name is being printed as [object object] even if i try to print them individually
Is there something wrong with my code or something else ?
Thanks for reading
edit : found my mistake , i was console logging superheroes instead of my var name i.e. SVHero 😅
The text was updated successfully, but these errors were encountered: