Pro JS Devs, Please Is This Variable Chaining - Programming (2) - Nairaland
Nairaland Forum › Science/Technology › Programming › Pro JS Devs, Please Is This Variable Chaining (1235 Views)
| Re: Pro JS Devs, Please Is This Variable Chaining by sixpathsofpain(op): 3:20pm On Jul 03, 2022 |
GREATIGBOMAN:I should be telling you that because if I hadn't tested it, I wouldn't have come to tell you you're wrong.. ![]() |
| Re: Pro JS Devs, Please Is This Variable Chaining by Nobody: 3:25pm On Jul 03, 2022 |
sixpathsofpain:OK Sir. Happy coding |
| Re: Pro JS Devs, Please Is This Variable Chaining by qtguru(m): 6:02pm On Jul 03, 2022 |
sixpathsofpain:You're wrong x = 17 Also I don't think you test the code, they are right, you should study more. |
| Re: Pro JS Devs, Please Is This Variable Chaining by Karleb(m): 6:16pm On Jul 03, 2022 |
The senior colleagues have spoken. Imagine the kind of bug we'd be dealing with if you re-asign a value to a variable and the reference catches the change automatically. It's the reason there is a difference between passing variable by reference and passing it by value. If I'm not capping. ![]() PHP used to do that shiit but they stopped and actually discouraged that since PHP 7 or so. |
| Re: Pro JS Devs, Please Is This Variable Chaining by remi1444: 9:09pm On Jul 03, 2022 |
As a noob, JavaScript runs from top to bottom, the change and reassignment of value you made at the bottom will likely not be effected at the top since the JavaScript machine executes the code from the top to the bottom. OP quit using VAR, the convention now is to stick with LET and CONST. |
| Re: Pro JS Devs, Please Is This Variable Chaining by remi1444: 9:09pm On Jul 03, 2022 |
As a noob, JavaScript runs from top to bottom, the change and reassignment of value you made at the bottom will likely not be effected at the top since the JavaScript machine executes the code from the top to the bottom. OP quit using VAR, the convention now is to stick with LET and CONST. |
| Re: Pro JS Devs, Please Is This Variable Chaining by qtguru(m): 10:11pm On Jul 03, 2022 |
remi1444:The exception is an array, when you copy an array, it's copies the reference, just like a pointer in C++, |
| Re: Pro JS Devs, Please Is This Variable Chaining by remi1444: 6:20am On Jul 04, 2022 |
qtguru:Oh yesss. Same with Object too. The only way to make a clone excluding future key values will be to use the spread(…) I guess. |
How Can I Achieve This With React JS .. Devs Pls Get In NOW!!!! • Help Pro JS Programmers, I'm Losing My Mind. • So There Are Devs That Earn Up To 30k USD. • 2 • 3 • 4
Free: Scbcd 5.0 Beta Certification Exam • Project Topic • Java Rocks: Java Rules

