Using if condition with the Imported variable

Hi guys I saw some people using imported variable....

but I am unsure how to properly use it for MV actually 

how do I create them and can use them for make condition?
var Imported = Imported || {};
This will keep the existing variable if it exists, or create a new one with an empty object if it doesn't.
Thanks! 

Now example do I have to use True or false or Digit for the imported?

I mean 

like 

Imported.Nio = 'digit';

?

in simple I want to do this :

Code:
 Spriteset_TitleScreen.prototype.createParticles = function() {    if(Imported.EmojiParticles === true){        if ($emoji.EnableParticles === true){            this._particles = new Emoji_Particles();        }    } };
If you don't care about the content of the variable, you should check for "truthiness", that is:

if(Imported.Nio) { ... }This way, the code in brackets will be executed, as long as Imported.Nio is defined and is not:

- null

- 0

- NaN

- '' (empty String)

- false
no it's just here for serve as flag for MV to detect if the plugin is present...

so I guess using this method could work : 

Code:
 Spriteset_TitleScreen.prototype.createParticles = function() {    if(Imported.EmojiParticles !== undefined){        if ($emoji.EnableParticles === true){            this._particles = new Emoji_Particles();        }    } };
Spriteset_TitleScreen.prototype.createParticles = function() { if(Imported.EmojiParticles){ if ($emoji.EnableParticles){ this._particles = new Emoji_Particles(); } } };why not like this? if it is not undefined, it will throw the value true, so you should just be checking whether Imported.EmojiParticles is true or not.
edit: sorry apparently i'm wrong 😀 .
I was unsure since Javascript is kinda sh*tty on detecting problem correctly so I avoid to left the system "guessing" what I want because f*ck Javascript can be such a bad interpreter.
Actually, it detects imported variables efficiently. What I did there was just something natural for the scripting language, which I used when I am still using Ruby.
it's depends if you use "use strict" or not I usually not use it but nope JavaScript can be horrible on debugging because it's create variable on the fly and set it automatically on 'undefined' when you bad write a variable...

so no I don't take chance with conditions and unless the variable is already defined I prefer define a clear condition.

Although I know this proceed don't forgot I am also a Ruby Native...so this proceed is natural...

just with JS you just don't take chance because JS != Ruby and JS is having really weird behavior 
If you are using strict mode, JavaScript won't initialize variables, unless you define them with "var". Also remember, if you aren't using strict mode and happen to create a variable like this:

Code:
for(i = 0; i < 10; ++i) { ... }
"i" will be create in the global scope and never be garbage collected, as long as the game runs.
I use JShint instead of strict-mode to check for errors and undefined variables. I used to have a lot of problems with "strict mode" not working properly on some devices.

Original thread: https://forums.rpgmakerweb.com/threads/using-if-condition-with-the-imported-variable.53549/