Click here to Skip to main content
15,898,036 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: var RVIPath = RVIPath || {}; Pin
BobJanova23-Jul-12 5:54
BobJanova23-Jul-12 5:54 
GeneralRe: var RVIPath = RVIPath || {}; Pin
Richard MacCutchan23-Jul-12 7:06
mveRichard MacCutchan23-Jul-12 7:06 
GeneralRe: var RVIPath = RVIPath || {}; Pin
BobJanova23-Jul-12 23:25
BobJanova23-Jul-12 23:25 
GeneralRe: var RVIPath = RVIPath || {}; Pin
Richard MacCutchan23-Jul-12 23:42
mveRichard MacCutchan23-Jul-12 23:42 
GeneralRe: var RVIPath = RVIPath || {}; Pin
Andy Brummer9-Aug-12 10:38
sitebuilderAndy Brummer9-Aug-12 10:38 
GeneralRe: var RVIPath = RVIPath || {}; Pin
Richard MacCutchan9-Aug-12 22:23
mveRichard MacCutchan9-Aug-12 22:23 
GeneralRe: var RVIPath = RVIPath || {}; Pin
Andy Brummer10-Aug-12 5:03
sitebuilderAndy Brummer10-Aug-12 5:03 
AnswerRe: var RVIPath = RVIPath || {}; Pin
J4amieC23-Jul-12 5:13
J4amieC23-Jul-12 5:13 
This relies on the truthyness/falseyness concept in javascript, and the fact that as part of a boolean operation, javascript will coerce things to truthyness or falseyness.

Falsey values in javascript are 0, null, undefined

So what this code says is "If RVIPath is truthy, assign its value to RVIPath. Otherwise assign an empty object to RVIPath"

It is a shorthand equivalent of

var RVIPath = null;
if(RVIPath)
   RVIPath = RVIPath;
else
   RVIPath = {};

QuestionI get "ReferenceError:'myreq' is undefined" error for <textarea> variable? Pin
creative2619-Jul-12 7:09
creative2619-Jul-12 7:09 
AnswerRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
jkirkerx19-Jul-12 8:42
professionaljkirkerx19-Jul-12 8:42 
AnswerRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
enhzflep22-Jul-12 19:51
enhzflep22-Jul-12 19:51 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
Peter_in_278022-Jul-12 20:07
professionalPeter_in_278022-Jul-12 20:07 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
enhzflep22-Jul-12 20:19
enhzflep22-Jul-12 20:19 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
Peter_in_278022-Jul-12 20:30
professionalPeter_in_278022-Jul-12 20:30 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
enhzflep22-Jul-12 20:39
enhzflep22-Jul-12 20:39 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
Peter_in_278022-Jul-12 20:55
professionalPeter_in_278022-Jul-12 20:55 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
enhzflep24-Jul-12 7:28
enhzflep24-Jul-12 7:28 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
Peter_in_278024-Jul-12 13:20
professionalPeter_in_278024-Jul-12 13:20 
GeneralRe: I get "ReferenceError:'myreq' is undefined" error for variable? Pin
enhzflep24-Jul-12 19:06
enhzflep24-Jul-12 19:06 
GeneralStop a page moving upwards Pin
offroaderdan18-Jul-12 23:24
offroaderdan18-Jul-12 23:24 
GeneralRe: Stop a page moving upwards Pin
jkirkerx19-Jul-12 8:36
professionaljkirkerx19-Jul-12 8:36 
QuestionHow to develop Smart TV Apps? Pin
prithveesh.goel17-Jul-12 0:22
prithveesh.goel17-Jul-12 0:22 
QuestionRe: How to develop Smart TV Apps? Pin
markovl17-Jul-12 0:36
markovl17-Jul-12 0:36 
AnswerRe: How to develop Smart TV Apps? Pin
prithveesh.goel17-Jul-12 20:56
prithveesh.goel17-Jul-12 20:56 
AnswerRe: How to develop Smart TV Apps? Pin
Richard MacCutchan17-Jul-12 2:50
mveRichard MacCutchan17-Jul-12 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.