DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript set variable if not defined
var x = (typeof x === 'undefined') ? your_default_value : x;
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#javascript
#set
#variable
#defined
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit