Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. variable

Tag: variable

j
javascript October 3, 2011 1 min read by mkyong 2 comments

Check if variable is exists in JavaScript

In some cases, your JavaScript may need to depend on a particular variable to “define” or “exists”, in order to process on the next step. Note I don’t recommend to do so, as JavaScript shouldn’t involve any business logic, it should be purely basic validation or UI enhancement, but, many still like to code complex […]

Read more Check if variable is exists in JavaScript
j
javascript October 2, 2011 2 min read by mkyong 25 comments

Check if variable is a number in JavaScript

In JavaScript, there are two ways to check if a variable is a number : isNaN() – Stands for “is Not a Number”, if variable is not a number, it return true, else return false. typeof – If variable is a number, it will returns a string named “number”. Note Normally, people use isNaN() to […]

Read more Check if variable is a number in JavaScript

Java and Spring tutorials since 2008. Every example is a complete, runnable file, compiled and run on a real machine before it goes out.

About This Site

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use

© 2026 mkyong.com — Powered by WordPress

RSS