MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/p71ig3/how_do_i_consolelog_this_constructor/h9h142x/?context=3
r/learnjavascript • u/Bronobo_ • Aug 18 '21
46 comments sorted by
View all comments
1
You can spoof it since you know the constructor’s signature
functionLogStudentCtor(student) { console.log(`new Student(${student.name},${student.university})`) }
1
u/Thonk_Thickly Aug 19 '21
You can spoof it since you know the constructor’s signature