-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlogIf.js
More file actions
37 lines (31 loc) · 890 Bytes
/
logIf.js
File metadata and controls
37 lines (31 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
let vUndefined;
const vNull = null;
const vString = "some text";
const vNumber = 10;
const vBoolean = false;
const vSymbol = Symbol('foo');
const vBigInt = BigInt(9007199254740991);
const vObjectObj = {property: "Value"}
const vArrayObject = [1, 2.1, "string"]
function functionObject(params) {}
async function functionAsync(params) {}
class ClassObj {}
function LOGprimitive(VAR){
if (typeof VAR !=="object" && VAR !=="function" && VAR !==null && VAR !==undefined)
{
return console.log("\n PRIMITIVE: ", typeof VAR, "\n Value: ",VAR);
}
return console.log("\n NOT PRIMITIVE..")
}
LOGprimitive(vUndefined)
LOGprimitive(vNull)
LOGprimitive(vString)
LOGprimitive(vNumber)
LOGprimitive(vBoolean)
LOGprimitive(vSymbol)
LOGprimitive(vBigInt)
LOGprimitive(vObjectObj)
LOGprimitive(vArrayObject)
LOGprimitive(functionObject)
LOGprimitive(functionAsync)
LOGprimitive(ClassObj)