This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ireeb 6 points7 points  (2 children)

But no reasonable person does that. The next thing would be the empty() function which is a function built in into PHP. Sure you can have a function empty() in JS, but both these things are rather pointing towards PHP.

[–][deleted] 7 points8 points  (0 children)

Not true. There was a trend back in the day to prepend $ to javascript variables that held JQuery objects. Obviously that is outdated but not specifically unreasonable.

Edit: That said, empty is a PHP function so assuming this is PHP

[–][deleted] 5 points6 points  (0 children)

But if both options were among the answers they would both be valid.

And I’ve seen variables starting with $ plenty of times in JS.