Undefined Code | SoloLearn: Learn to code for FREE!

+2

Undefined Code

Hey everybody, I made a code but when i run it keeps saying undefined. What's wrong with my code? You can visit it here: https://code.sololearn.com/WMg1K2nVusbz/?ref=app I'm new at coding and programming. Thank you

6/3/2020 2:57:27 AM

Code For Success

1 Answer

New Answer

+4

Just replace y = car.carName with t.carName since t is the object you created which is a car that has an actual name As for the function car it self, it just says that a car has a name but doesn't specifically define that name