Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[object Object] #9

Closed
sc0609 opened this issue Apr 29, 2022 · 0 comments
Closed

[object Object] #9

sc0609 opened this issue Apr 29, 2022 · 0 comments

Comments

@sc0609
Copy link

sc0609 commented Apr 29, 2022

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 😅

@sc0609 sc0609 closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant