minus-squareFlumPHPlinkfedilinkarrow-up26·10 个月前“Monday”.length is working JavaScript and does equal 6. No print command afaik though.
minus-squaredvlsg@lemmy.worldlinkfedilinkEnglisharrow-up12·10 个月前There technically is! https://developer.mozilla.org/en-US/docs/Web/API/Window/print Well. In browsers, anyways.
minus-squareScrollone@feddit.itlinkfedilinkarrow-up4·10 个月前Yes, but it prints the page, so in this case it wouldn’t print anything
minus-squarePrettyFlyForAFatGuy@feddit.uklinkfedilinkarrow-up8arrow-down1·edit-210 个月前function print(str) { console.log(str) } FTFY
minus-squarekia@lemmy.calinkfedilinkEnglisharrow-up2·10 个月前You don’t need terminating semicolons in JavaScript. They’re added in if missing. It can actually cause a few bugs around returns.
“Monday”.length is working JavaScript and does equal 6. No print command afaik though.
There technically is!
https://developer.mozilla.org/en-US/docs/Web/API/Window/print
Well. In browsers, anyways.
Yes, but it prints the page, so in this case it wouldn’t print anything
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.