Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
How to stop execution of function in javascript?
Please see below code:
if(m=='') { alert("novalue"); getDate().stopPropagation(); }
I want that if(m==null) the getDate() should not get executed.
if(m==null)
getDate()
How this can get achieved in javascript?
if
===
==
You can modify the if condition as below
if(m=='' && m !== null) { }
This may help you.
Add a comment
did you changed the question?
if (m==='') { ... }
=== matches the value and the type
stopPropagation()
Date
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
if?===instead of==?