parent
8556d9ba3f
commit
00ec649ea9
@ -0,0 +1,13 @@
|
||||
const countries = [
|
||||
'Albania',
|
||||
'Bolivia',
|
||||
'Canada',
|
||||
'Denmark',
|
||||
'Ethiopia',
|
||||
'Finland',
|
||||
'Germany',
|
||||
'Hungary',
|
||||
'Ireland',
|
||||
'Japan',
|
||||
'Kenya'
|
||||
]
|
||||
@ -0,0 +1,9 @@
|
||||
const webTechs = [
|
||||
'HTML',
|
||||
'CSS',
|
||||
'JavaScript',
|
||||
'React',
|
||||
'Redux',
|
||||
'Node',
|
||||
'MongoDB'
|
||||
]
|
||||
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>30DaysOfJavaScript:Day 05</title>
|
||||
</head>
|
||||
|
||||
<body style="background-color: black; color: white;">
|
||||
<style>
|
||||
button {
|
||||
color: white;
|
||||
background-color: black;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
</style>
|
||||
<h1>30DaysOfJavaScript:Day 05</h1>
|
||||
<h2>Arrays</h2>
|
||||
|
||||
<script src="data/countries.js"></script>
|
||||
<script src="main.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,8 @@
|
||||
const emptArr = [];
|
||||
const arr = [1,2,3,4,5];
|
||||
const arrLen = arr.length;
|
||||
|
||||
console.log("length is :", arrLen); // array length
|
||||
|
||||
console.log(arr[0]); // first item
|
||||
console.log([arr.length - 1]); // last item
|
||||
Loading…
Reference in new issue