Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
cafecortado5030283d"hey" << uu
Depends a lot on the language.
ScriptCoded18766283dFirst :) Might use second with spaces around the plus sign. Basically never use double quotes. Assuming you mean JS, that is.
Most other languages: "hey"+uu
I have this problem of strings being in double quotes, and chars (single letters) being in single quotes 🤷♂️
nitwhiz12278283dFirst, but interestingly enough, the second is still in my muscle memory.
Third only when I'm drunk or doing golang.
Voxera11637283d@green-portal bring out the pitchforks ;)
lorentz12785283dIn JS I exclusively use template strings, I even have an eslint rule against adding something to a string literal
melezorus343727282d@C0D4 I /C/ where you are coming from
ZaLiTHkA853282dAssuming JS/TS related..?
I use the first option if I need to reference any variables in building the string, purely because it's easier to read. (This also makes it easier to bounce between TS and Flutter, which I do quite often)
Otherwise I use the third option, because then I don't need to escape any apostrophes that the string might contain.
For the most part, I find strings tend to contain apostrophes way more often than quotation marks..
Anything without interpolation is in single quotes. (Except in C, ofc)
github5Sharing a short story. Time: 1:30 am Conversation between me and a night watchman in my society. I was walking...
LevitatingLion523:59 -> 0:00 First thought: did the clock just broke? Second thought: oh right it's midnight
FunniestClown16Did anyone notice this? Today's date is a palindrome: 8 10 2018 👻😍
Which one do you use¿ And wheres poll bot :'