+ 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
1 ответ
+ 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