JPDev@programming.dev to Programmer Humor@programming.dev · 6 months agoExam Answerprogramming.devimagemessage-square58fedilinkarrow-up1554arrow-down17
arrow-up1547arrow-down1imageExam Answerprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 6 months agomessage-square58fedilink
minus-squarepotustheplant@feddit.nllinkfedilinkarrow-up16arrow-down16·6 months agoNot really, no. That would be the answer if x= len(day). The code in the image would just throw an error.
minus-squareFlumPHP@programming.devlinkfedilinkarrow-up18·6 months ago“Monday”.length is working JavaScript and does equal 6. No print command afaik though.
minus-squarePrettyFlyForAFatGuy@feddit.uklinkfedilinkarrow-up5arrow-down1·edit-26 months agofunction print(str) { console.log(str) } FTFY
minus-squarekia@lemmy.calinkfedilinkEnglisharrow-up1·6 months agoYou don’t need terminating semicolons in JavaScript. They’re added in if missing. It can actually cause a few bugs around returns.
Not really, no. That would be the answer if x= len(day). The code in the image would just throw an error.
Yea, it’s pseudo code.
“Monday”.length is working JavaScript and does equal 6. No print command afaik though.
function print(str) { console.log(str) }
FTFY
deleted by creator
You don’t need terminating semicolons in JavaScript. They’re added in if missing. It can actually cause a few bugs around returns.