0

Is this possible to do with an object constructor

I am trying to see if I can use an object like this: xy = { x: 1; y: 2;} (Same with hw) And then use the dot notation to pass both the x & y values (xy.x) into an object constructor for canvas. Function constructor(xy.x, xy.y, color, wh.width, wh.height) { ........ } Is this possible by referencing like: this.xy.x = xy.x;? Or could someone help me figure out how to do this using class constrictor? This probably sounds stupid like "TF that's dumb idk why you'd want to do that..." I guess I'm just tinker-learning and if you have any advice at all Im all ears (or well... eyes; tomato potato lol). https://code.sololearn.com/WPDKxX7unVEe/?ref=app

2nd Jun 2022, 9:29 PM
pHANTOM|sTEELE
1 Respuesta
0
This is not possible. And this way give easy hack to hackers
17th Jun 2022, 6:03 AM
Ro'zimuhammad Xolxo'jayev
Ro'zimuhammad Xolxo'jayev - avatar