+ 1
Can anyone explain this process.??
<script> function Car(color){ this.color = color || "red"; } var myCar = new Car (); console.log(myCar.color); </script>
2 Answers
+ 1
What exactly you do not understand from
above code?
+ 1
It is to change your function to object and choose between the red and undefined in the console



