FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScriptNote/data/random.js at master · mbrsagor/JavaScriptNote · GitHub
mbrsagor
/
JavaScriptNote
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScriptNote
/
data
/
random.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (55 loc) · 1.37 KB
Breadcrumbs
JavaScriptNote
/
data
/
random.js
Copy path
File metadata and controls
66 lines (55 loc) · 1.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Multiple varialbe use
let
a
=
b
=
c
=
30
console
.
log
(
a
)
;
console
.
log
(
b
)
;
console
.
log
(
c
)
;
console
.
log
(
'\n'
)
;
// One Statement, Many Variables
let
x
=
10
,
y
=
20
,
z
=
30
;
console
.
log
(
x
)
;
console
.
log
(
y
)
;
console
.
log
(
z
)
;
// Undefined
let
username
;
console
.
log
(
username
)
;
username
=
"mbr-sagor"
;
console
.
log
(
username
)
;
// Null
let
is_ative
=
null
;
console
.
log
(
is_ative
)
;
is_ative
=
true
;
console
.
log
(
is_ative
)
;
var
$
=
"username"
;
console
.
log
(
$
)
;
function
calculate
(
num1
,
num2
)
{
var
result
;
return
result
=
`Total add:
${
num1
+
num2
}
${
'\n'
}
Total sub:
${
num1
-
num2
}
${
'\n'
}
Total mul:
${
num1
*
num2
}
${
'\n'
}
Total div:
${
num1
/
num2
}
${
'\n'
}
Total module:
${
num1
%
num2
}
`
}
cal
=
calculate
(
50
,
30
)
;
console
.
log
(
cal
)
;
// undefine and null
let
f_name
=
''
,
l_name
;
if
(
f_name
===
l_name
)
{
console
.
log
(
typeof
(
f_name
)
)
;
console
.
log
(
"It's okay"
)
;
}
else
{
console
.
log
(
typeof
(
l_name
)
)
;
console
.
log
(
"It's not okay man!"
)
;
}
// Local date time
let
date
=
Date
(
)
;
console
.
log
(
date
)
;
let
text
=
"Hello there, I'm full-stack software developer with more then 2 year solid..."
;
console
.
log
(
`Length of text:
${
text
.
length
}
`
)
;
// Object
let
employee
=
{
first_name
:
"mbr"
,
last_name
:
"sagor"
,
full_name
:
"Bozlur Rosid Sagor"
,
email
:
"sagor@gamil.com"
}
// display all
console
.
log
(
employee
)
;
// change/update 1st name
employee
.
first_name
=
"Mr."
;
console
.
log
(
employee
)
;
Back
|
FazBrowse Home
|
New Git URL