Red@reddthat.com to linuxmemes@lemmy.worldEnglish · 7 months agoCode interviews for a PHP developer rolesreddthat.comimagemessage-square121fedilinkarrow-up1102arrow-down19
arrow-up193arrow-down1imageCode interviews for a PHP developer rolesreddthat.comRed@reddthat.com to linuxmemes@lemmy.worldEnglish · 7 months agomessage-square121fedilink
minus-square_thebrain_@sh.itjust.workslinkfedilinkarrow-up0·7 months agoNot one person in the comments has attempted to answer any of the questions either.
minus-squarebasdiljhs@lemmy.worldlinkfedilinkarrow-up2·7 months agofor(var i=0;i<=100;i++){ if((i%2)==1) console.log(i); } btw % is the modulo operator, x%y returns the remainder of division of x by y
minus-squareLostXOR@fedia.iolinkfedilinkarrow-up1arrow-down1·7 months agoSlightly simpler, start at 1 and increment by 2 so you don’t have to check whether i is odd. for (var i = 1; i < 100; i += 2) { console.log(i); }
minus-squareJeena@jemmy.jeena.netlinkfedilinkarrow-up2arrow-down1·7 months agoStrictly speaking this one does not find the odd numbers, it just prints them.
minus-squarethemusicman@lemmy.worldlinkfedilinkarrow-up2·7 months agoHaha good try. Hope your interview goes well
minus-squareI Cast Fist@programming.devlinkfedilinkarrow-up1·7 months agoWill you give me the position if I answer the problems? 😀
minus-square_thebrain_@sh.itjust.workslinkfedilinkarrow-up1·7 months agoSure! I’ll hire you without even answering the questions. Of course I’m not the op, I dont work in the it field (any more) and none of my open positions involve programming… But you have a job with my company whenever you need one.
minus-squareBolt@lemmy.worldlinkfedilinkarrow-up1·7 months ago(0..=100).filter(|n| n % 2 == 1).for_each(|n| println!("{n}"))
Not one person in the comments has attempted to answer any of the questions either.
for (i%1=0; i+2; int) odd++; cout(3)
for(var i=0;i<=100;i++){ if((i%2)==1) console.log(i); }
btw % is the modulo operator, x%y returns the remainder of division of x by y
Slightly simpler, start at 1 and increment by 2 so you don’t have to check whether i is odd.
for (var i = 1; i < 100; i += 2) { console.log(i); }
Strictly speaking this one does not find the odd numbers, it just prints them.
Haha good try. Hope your interview goes well
Will you give me the position if I answer the problems? 😀
Sure! I’ll hire you without even answering the questions. Of course I’m not the op, I dont work in the it field (any more) and none of my open positions involve programming… But you have a job with my company whenever you need one.
(0..=100).filter(|n| n % 2 == 1).for_each(|n| println!("{n}"))