I'm new to this, so wondering if someone could please advise why isNaN() is undefined?
package nan; public class nan { public static void main(String[] args) { { if (isNaN(1)) {System.out.println("true");} }; } } thanks
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalI'm new to this, so wondering if someone could please advise why isNaN() is undefined?
package nan; public class nan { public static void main(String[] args) { { if (isNaN(1)) {System.out.println("true");} }; } } thanks
You want Double.isNaN or Float.isNaN in Java.
System.out.printlnis not native JavaScript.