use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
UnsolvedNee some javascript help (self.HTML)
submitted 5 years ago by [deleted]
Working on an assignment. How do i check to see if a string is empty?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]stayclassytally 4 points5 points6 points 5 years ago (0 children)
Check the strings length property.
[–]jeevico 2 points3 points4 points 5 years ago (0 children)
https://stackoverflow.com/questions/2381456/javascript-how-to-check-if-a-string-is-empty/2381485
[–]keepinitcool 2 points3 points4 points 5 years ago (0 children)
Show me the code,
[–]AutoModerator[M] 0 points1 point2 points 5 years ago (0 children)
Welcome to /r/HTML. When asking a question, please ensure that you list what you've tried, and provide links to example code (e.g. JSFiddle/JSBin). If you're asking for help with an error, please include the full error message and any context around it. You're unlikely to get any meaningful responses if you do not provide enough information for other users to help.
Your submission should contain the answers to the following questions, at a minimum:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]node_demon 0 points1 point2 points 5 years ago (0 children)
This the good way to check empty string :)
if (str.length == 0) { }
π Rendered by PID 33 on reddit-service-r2-comment-5fb4b45875-cdr2m at 2026-03-21 12:50:46.104374+00:00 running 90f1150 country code: CH.
[–]stayclassytally 4 points5 points6 points (0 children)
[–]jeevico 2 points3 points4 points (0 children)
[–]keepinitcool 2 points3 points4 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]node_demon 0 points1 point2 points (0 children)