forked from TheOdinProject/javascript-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompletion Terminal Data - Assigment 0-5 - Data Types and Conditionals
More file actions
588 lines (530 loc) · 28.6 KB
/
Copy pathCompletion Terminal Data - Assigment 0-5 - Data Types and Conditionals
File metadata and controls
588 lines (530 loc) · 28.6 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
offvault@Odintu:~$ ^[[200~sudo apt install curl
sudo: command not found
offvault@Odintu:~$ ~sudo apt install curl
Command '~sudo' not found, did you mean:
command 'sudo' from deb sudo (1.9.9-1ubuntu2.4)
command 'sudo' from deb sudo-ldap (1.9.9-1ubuntu2.4)
Try: sudo apt install <deb name>
offvault@Odintu:~$ sudo apt install curl
[sudo] password for offvault:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 194 kB of archives.
After this operation, 455 kB of additional disk space will be used.
Get:1 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.20 [194 kB]
Fetched 194 kB in 10s (19.0 kB/s)
Selecting previously unselected package curl.
(Reading database ... 206218 files and directories currently installed.)
Preparing to unpack .../curl_7.81.0-1ubuntu1.20_amd64.deb ...
Unpacking curl (7.81.0-1ubuntu1.20) ...
Setting up curl (7.81.0-1ubuntu1.20) ...
Processing triggers for man-db (2.10.2-1) ...
offvault@Odintu:~$ sudo apt update && sudo apt upgrade
Get:1 https://packages.microsoft.com/repos/code stable InRelease [3,590 B]
Get:2 https://packages.microsoft.com/repos/code stable/main armhf Packages [20.2 kB]
Get:3 https://packages.microsoft.com/repos/code stable/main amd64 Packages [20.1 kB]
Get:4 https://packages.microsoft.com/repos/code stable/main arm64 Packages [20.2 kB]
Hit:5 http://ae.archive.ubuntu.com/ubuntu jammy InRelease
Get:6 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Get:7 http://ae.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Hit:8 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy InRelease
Get:9 http://ae.archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:10 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,210 B]
Get:11 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2,873 kB]
Get:12 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [869 kB]
Get:13 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [451 kB]
Get:14 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [112 kB]
Get:15 http://ae.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [4,340 kB]
Get:16 http://ae.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [793 kB]
Get:17 http://ae.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 DEP-11 Metadata [212 B]
Get:18 http://ae.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,227 kB]
Get:19 http://ae.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [782 kB]
Get:20 http://ae.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [304 kB]
Get:21 http://ae.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [359 kB]
Get:22 http://ae.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:23 http://ae.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,084 B]
Get:24 http://ae.archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 DEP-11 Metadata [212 B]
Get:25 http://ae.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [25.8 kB]
Get:26 http://ae.archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 DEP-11 Metadata [212 B]
Get:27 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:28 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [54.5 kB]
Get:29 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B]
Get:30 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [126 kB]
Get:31 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B]
Fetched 12.8 MB in 10s (1,270 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
exo-utils libzvbi-common libheif1 libpathplan4 graphviz libgvpr2 libgvc6
libopenexr25 libpostproc55 libcgraph6 libcdt5 libavcodec58
libgstreamer-plugins-bad1.0-0 libavutil56 libswscale5 libexo-2-0
liblab-gamut1 libswresample3 libavformat58 libzvbi0 libde265-0 libexo-common
libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following NEW packages will be installed:
linux-headers-6.8.0-78-generic linux-hwe-6.8-headers-6.8.0-78
linux-hwe-6.8-tools-6.8.0-78 linux-image-6.8.0-78-generic
linux-modules-6.8.0-78-generic linux-modules-extra-6.8.0-78-generic
linux-tools-6.8.0-78-generic
The following packages will be upgraded:
code git git-man google-chrome-stable libglib2.0-0 libglib2.0-bin
libglib2.0-data libsmbclient libwbclient0 linux-generic-hwe-22.04
linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04
linux-tools-common powermgmt-base samba-libs snapd
16 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 422 MB of archives.
After this operation, 797 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://packages.microsoft.com/repos/code stable/main amd64 code amd64 1.103.2-1755709794 [113 MB]
Get:2 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 139.0.7258.154-1 [119 MB]
Get:3 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libglib2.0-data all 2.72.4-0ubuntu2.6 [4,698 B]
Get:4 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libglib2.0-bin amd64 2.72.4-0ubuntu2.6 [80.9 kB]
Get:5 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libglib2.0-0 amd64 2.72.4-0ubuntu2.6 [1,467 kB]
Get:6 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main amd64 git amd64 1:2.51.0-0ppa2~ubuntu22.04.1 [7,079 kB]
Get:7 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsmbclient amd64 2:4.15.13+dfsg-0ubuntu1.7 [65.9 kB]
Get:8 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libwbclient0 amd64 2:4.15.13+dfsg-0ubuntu1.7 [268 kB]
Get:9 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 samba-libs amd64 2:4.15.13+dfsg-0ubuntu1.7 [6,775 kB]
Get:10 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 powermgmt-base all 1.36ubuntu0.22.04.1 [7,736 B]
Get:11 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-6.8.0-78-generic amd64 6.8.0-78.78~22.04.1 [26.3 MB]
Get:12 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-6.8.0-78-generic amd64 6.8.0-78.78~22.04.1 [14.7 MB]
Get:13 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-extra-6.8.0-78-generic amd64 6.8.0-78.78~22.04.1 [79.6 MB]
Get:14 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-generic-hwe-22.04 amd64 6.8.0-78.78~22.04.1 [1,724 B]
Get:15 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-generic-hwe-22.04 amd64 6.8.0-78.78~22.04.1 [2,496 B]
Get:16 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-hwe-6.8-headers-6.8.0-78 all 6.8.0-78.78~22.04.1 [13.6 MB]
Get:17 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-6.8.0-78-generic amd64 6.8.0-78.78~22.04.1 [3,598 kB]
Get:18 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-generic-hwe-22.04 amd64 6.8.0-78.78~22.04.1 [2,332 B]
Get:19 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-tools-common all 5.15.0-153.163 [294 kB]
Get:20 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-hwe-6.8-tools-6.8.0-78 amd64 6.8.0-78.78~22.04.1 [4,410 kB]
Get:21 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-tools-6.8.0-78-generic amd64 6.8.0-78.78~22.04.1 [1,816 B]
Get:22 http://ae.archive.ubuntu.com/ubuntu jammy-updates/main amd64 snapd amd64 2.68.5+ubuntu22.04.1 [30.0 MB]
Get:23 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main amd64 git-man all 1:2.51.0-0ppa2~ubuntu22.04.1 [2,314 kB]
Fetched 422 MB in 46s (9,245 kB/s)
Preconfiguring packages ...
(Reading database ... 206225 files and directories currently installed.)
Preparing to unpack .../00-libglib2.0-data_2.72.4-0ubuntu2.6_all.deb ...
Unpacking libglib2.0-data (2.72.4-0ubuntu2.6) over (2.72.4-0ubuntu2.5) ...
Preparing to unpack .../01-libglib2.0-bin_2.72.4-0ubuntu2.6_amd64.deb ...
Unpacking libglib2.0-bin (2.72.4-0ubuntu2.6) over (2.72.4-0ubuntu2.5) ...
Preparing to unpack .../02-libglib2.0-0_2.72.4-0ubuntu2.6_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.72.4-0ubuntu2.6) over (2.72.4-0ubuntu2.5) ...
Preparing to unpack .../03-google-chrome-stable_139.0.7258.154-1_amd64.deb ...
Unpacking google-chrome-stable (139.0.7258.154-1) over (138.0.7204.183-1) ...
Preparing to unpack .../04-libsmbclient_2%3a4.15.13+dfsg-0ubuntu1.7_amd64.deb ..
.
Unpacking libsmbclient:amd64 (2:4.15.13+dfsg-0ubuntu1.7) over (2:4.15.13+dfsg-0u
buntu1.6) ...
Preparing to unpack .../05-libwbclient0_2%3a4.15.13+dfsg-0ubuntu1.7_amd64.deb ..
.
Unpacking libwbclient0:amd64 (2:4.15.13+dfsg-0ubuntu1.7) over (2:4.15.13+dfsg-0u
buntu1.6) ...
Preparing to unpack .../06-samba-libs_2%3a4.15.13+dfsg-0ubuntu1.7_amd64.deb ...
Unpacking samba-libs:amd64 (2:4.15.13+dfsg-0ubuntu1.7) over (2:4.15.13+dfsg-0ubu
ntu1.6) ...
Preparing to unpack .../07-powermgmt-base_1.36ubuntu0.22.04.1_all.deb ...
Unpacking powermgmt-base (1.36ubuntu0.22.04.1) over (1.36) ...
Preparing to unpack .../08-code_1.103.2-1755709794_amd64.deb ...
Unpacking code (1.103.2-1755709794) over (1.102.3-1753759567) ...
Preparing to unpack .../09-git_1%3a2.51.0-0ppa2~ubuntu22.04.1_amd64.deb ...
Unpacking git (1:2.51.0-0ppa2~ubuntu22.04.1) over (1:2.50.1-0ppa1~ubuntu22.04.1)
...
Preparing to unpack .../10-git-man_1%3a2.51.0-0ppa2~ubuntu22.04.1_all.deb ...
Unpacking git-man (1:2.51.0-0ppa2~ubuntu22.04.1) over (1:2.50.1-0ppa1~ubuntu22.0
4.1) ...
Selecting previously unselected package linux-modules-6.8.0-78-generic.
Preparing to unpack .../11-linux-modules-6.8.0-78-generic_6.8.0-78.78~22.04.1_am
d64.deb ...
Unpacking linux-modules-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Selecting previously unselected package linux-image-6.8.0-78-generic.
Preparing to unpack .../12-linux-image-6.8.0-78-generic_6.8.0-78.78~22.04.1_amd6
4.deb ...
Unpacking linux-image-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Selecting previously unselected package linux-modules-extra-6.8.0-78-generic.
Preparing to unpack .../13-linux-modules-extra-6.8.0-78-generic_6.8.0-78.78~22.0
4.1_amd64.deb ...
Unpacking linux-modules-extra-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Preparing to unpack .../14-linux-generic-hwe-22.04_6.8.0-78.78~22.04.1_amd64.deb
...
Unpacking linux-generic-hwe-22.04 (6.8.0-78.78~22.04.1) over (6.8.0-65.68~22.04.
1) ...
Preparing to unpack .../15-linux-image-generic-hwe-22.04_6.8.0-78.78~22.04.1_amd
64.deb ...
Unpacking linux-image-generic-hwe-22.04 (6.8.0-78.78~22.04.1) over (6.8.0-65.68~
22.04.1) ...
Selecting previously unselected package linux-hwe-6.8-headers-6.8.0-78.
Preparing to unpack .../16-linux-hwe-6.8-headers-6.8.0-78_6.8.0-78.78~22.04.1_al
l.deb ...
Unpacking linux-hwe-6.8-headers-6.8.0-78 (6.8.0-78.78~22.04.1) ...
Selecting previously unselected package linux-headers-6.8.0-78-generic...........]
Preparing to unpack .../17-linux-headers-6.8.0-78-generic_6.8.0-78.78~22.04.1_amd64.deb ...
Unpacking linux-headers-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Preparing to unpack .../18-linux-headers-generic-hwe-22.04_6.8.0-78.78~22.04.1_amd64.deb ...
Unpacking linux-headers-generic-hwe-22.04 (6.8.0-78.78~22.04.1) over (6.8.0-65.68~22.04.1) ...
Preparing to unpack .../19-linux-tools-common_5.15.0-153.163_all.deb ...
Unpacking linux-tools-common (5.15.0-153.163) over (5.15.0-152.162) ...
Selecting previously unselected package linux-hwe-6.8-tools-6.8.0-78.
Preparing to unpack .../20-linux-hwe-6.8-tools-6.8.0-78_6.8.0-78.78~22.04.1_amd64.deb ...
Unpacking linux-hwe-6.8-tools-6.8.0-78 (6.8.0-78.78~22.04.1) ...
Selecting previously unselected package linux-tools-6.8.0-78-generic.
Preparing to unpack .../21-linux-tools-6.8.0-78-generic_6.8.0-78.78~22.04.1_amd64.deb ...
Unpacking linux-tools-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Preparing to unpack .../22-snapd_2.68.5+ubuntu22.04.1_amd64.deb ...
Unpacking snapd (2.68.5+ubuntu22.04.1) over (2.67.1+22.04) ...
Setting up powermgmt-base (1.36ubuntu0.22.04.1) ...
Setting up snapd (2.68.5+ubuntu22.04.1) ...
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Setting up libglib2.0-0:amd64 (2.72.4-0ubuntu2.6) ...
Setting up linux-modules-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Setting up libwbclient0:amd64 (2:4.15.13+dfsg-0ubuntu1.7) ...
Setting up linux-image-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.8.0-65-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-6.8.0-65-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-6.8.0-78-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.8.0-78-generic
Setting up libglib2.0-data (2.72.4-0ubuntu2.6) ...
Setting up linux-hwe-6.8-headers-6.8.0-78 (6.8.0-78.78~22.04.1) ...
Setting up git-man (1:2.51.0-0ppa2~ubuntu22.04.1) ...
Setting up linux-tools-common (5.15.0-153.163) ...
Setting up code (1.103.2-1755709794) ...
Setting up google-chrome-stable (139.0.7258.154-1) ...
Setting up linux-headers-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Setting up linux-modules-extra-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Setting up libglib2.0-bin (2.72.4-0ubuntu2.6) ...
Setting up samba-libs:amd64 (2:4.15.13+dfsg-0ubuntu1.7) ...
Setting up linux-hwe-6.8-tools-6.8.0-78 (6.8.0-78.78~22.04.1) ...
Setting up linux-tools-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
Setting up git (1:2.51.0-0ppa2~ubuntu22.04.1) ...
Setting up libsmbclient:amd64 (2:4.15.13+dfsg-0ubuntu1.7) ...
Setting up linux-headers-generic-hwe-22.04 (6.8.0-78.78~22.04.1) ...
Setting up linux-image-generic-hwe-22.04 (6.8.0-78.78~22.04.1) ...
Setting up linux-generic-hwe-22.04 (6.8.0-78.78~22.04.1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for linux-image-6.8.0-78-generic (6.8.0-78.78~22.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-78-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.0-78-generic
Found initrd image: /boot/initrd.img-6.8.0-78-generic
Found linux image: /boot/vmlinuz-6.8.0-65-generic
Found initrd image: /boot/initrd.img-6.8.0-65-generic
Found linux image: /boot/vmlinuz-6.8.0-60-generic
Found initrd image: /boot/initrd.img-6.8.0-60-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
offvault@Odintu:~$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16631 100 16631 0 0 61675 0 --:--:-- --:--:-- --:--:-- 61596
=> Downloading nvm from git to '/home/offvault/.nvm'
=> Cloning into '/home/offvault/.nvm'...
remote: Enumerating objects: 383, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 383 (delta 43), reused 178 (delta 29), pack-reused 0 (from 0)
Receiving objects: 100% (383/383), 392.12 KiB | 775.00 KiB/s, done.
Resolving deltas: 100% (43/43), done.
* (HEAD detached at FETCH_HEAD)
master
=> Compressing and cleaning up git repository
=> Appending nvm source string to /home/offvault/.bashrc
=> Appending bash_completion source string to /home/offvault/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
offvault@Odintu:~$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
offvault@Odintu:~$ command -v nvm
nvm
offvault@Odintu:~$ nvm install --lts
Installing latest LTS version.
Downloading and installing node v22.18.0...
Downloading https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-x64.tar.xz...
################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v22.18.0 (npm v10.9.3)
Creating default alias: default -> lts/* (-> v22.18.0)
offvault@Odintu:~$ nvm use --lts
Now using node v22.18.0 (npm v10.9.3)
offvault@Odintu:~$ node
Welcome to Node.js v22.18.0.
Type ".help" for more information.
> .quit
Invalid REPL keyword
> .exit
offvault@Odintu:~$ ls
Desktop Documents Downloads Music Pictures Public repos snap Templates Videos wget-log
offvault@Odintu:~$ cd repos
offvault@Odintu:~/repos$ ls
css css-exercises git_test Javascript odin-recipes TOP-Landing-Page
offvault@Odintu:~/repos$ code TOP-Landing-Page/
offvault@Odintu:~/repos$ git clone git@github.com:offvault/javascript-exercises.git
Cloning into 'javascript-exercises'...
remote: Enumerating objects: 5936, done.
remote: Total 5936 (delta 0), reused 0 (delta 0), pack-reused 5936 (from 1)
Receiving objects: 100% (5936/5936), 5.14 MiB | 1.48 MiB/s, done.
Resolving deltas: 100% (1762/1762), done.
offvault@Odintu:~/repos$ ls
css css-exercises git_test Javascript javascript-exercises odin-recipes TOP-Landing-Page
offvault@Odintu:~/repos$ cd javascript-exercises/
offvault@Odintu:~/repos/javascript-exercises$ npm install
added 579 packages, and audited 580 packages in 8s
140 packages are looking for funding
run `npm fund` for details
9 vulnerabilities (6 low, 2 moderate, 1 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 10.9.3 -> 11.5.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.5.2
npm notice To update run: npm install -g npm@11.5.2
npm notice
offvault@Odintu:~/repos/javascript-exercises$ cd ..
offvault@Odintu:~/repos$ code javascript-exercises/
offvault@Odintu:~/repos$ ls
css css-exercises git_test Javascript javascript-exercises odin-recipes TOP-Landing-Page
offvault@Odintu:~/repos$ cd javascript-exercises/
offvault@Odintu:~/repos/javascript-exercises$ ls
01_helloWorld 06_repeatString 11_tempConversion 16_findTheOldest node_modules
02_addNumbers 07_reverseString 12_calculator archive package.json
03_numberChecker 08_removeFromArray 13_palindromes CONTRIBUTING.md package-lock.json
04_mathEquations 09_sumAll 14_fibonacci generators plopFile.js
05_joinStrings 10_leapYears 15_getTheTitles LICENSE README.md
offvault@Odintu:~/repos/javascript-exercises$ cd 01_helloWorld/
offvault@Odintu:~/repos/javascript-exercises/01_helloWorld$ npm test helloWorld.spec.js
> javascript-exercises@1.0.0 test
> jest helloWorld.spec.js
FAIL 01_helloWorld/helloWorld.spec.js
Hello World
✕ says "Hello, World!" (3 ms)
● Hello World › says "Hello, World!"
expect(received).toEqual(expected) // deep equality
Expected: "Hello, World!"
Received: ""
3 | describe('Hello World', function() {
4 | test('says "Hello, World!"', function() {
> 5 | expect(helloWorld()).toEqual('Hello, World!');
| ^
6 | });
7 | });
8 |
at Object.toEqual (01_helloWorld/helloWorld.spec.js:5:26)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.379 s
Ran all test suites matching /helloWorld.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/01_helloWorld$ npm test helloWorld.spec.js
> javascript-exercises@1.0.0 test
> jest helloWorld.spec.js
PASS 01_helloWorld/helloWorld.spec.js
Hello World
✓ says "Hello, World!" (3 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.274 s, estimated 1 s
Ran all test suites matching /helloWorld.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/01_helloWorld$ cd ..
offvault@Odintu:~/repos/javascript-exercises$ ls
01_helloWorld 06_repeatString 11_tempConversion 16_findTheOldest node_modules
02_addNumbers 07_reverseString 12_calculator archive package.json
03_numberChecker 08_removeFromArray 13_palindromes CONTRIBUTING.md package-lock.json
04_mathEquations 09_sumAll 14_fibonacci generators plopFile.js
05_joinStrings 10_leapYears 15_getTheTitles LICENSE README.md
offvault@Odintu:~/repos/javascript-exercises$ cd 02_addNumbers/
offvault@Odintu:~/repos/javascript-exercises/02_addNumbers$ npm test addNumbers.js
> javascript-exercises@1.0.0 test
> jest addNumbers.js
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/offvault/repos/javascript-exercises
86 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 39 matches
testPathIgnorePatterns: generators/ - 82 matches
testRegex: - 0 matches
Pattern: addNumbers.js - 0 matches
offvault@Odintu:~/repos/javascript-exercises/02_addNumbers$ npm test addNumbers.spec.js
> javascript-exercises@1.0.0 test
> jest addNumbers.spec.js
PASS 02_addNumbers/addNumbers.spec.js
addNumbers
✓ adds the numbers together (2 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.273 s
Ran all test suites matching /addNumbers.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/02_addNumbers$ cd ..
offvault@Odintu:~/repos/javascript-exercises$ cd 03_numberChecker/
offvault@Odintu:~/repos/javascript-exercises/03_numberChecker$ npm test numberChecker.spec.js
> javascript-exercises@1.0.0 test
> jest numberChecker.spec.js
FAIL 03_numberChecker/numberChecker.spec.js
numberChecker
✕ returns true when number is 1000 (3 ms)
○ skipped returns true when number is 10
○ skipped returns false when number is 9
○ skipped returns false when number is 6
● numberChecker › returns true when number is 1000
expect(received).toEqual(expected) // deep equality
Expected: true
Received: false
3 | describe('numberChecker', () => {
4 | test('returns true when number is 1000', () => {
> 5 | expect(numberChecker(1000)).toEqual(true);
| ^
6 | });
7 | test.skip('returns true when number is 10', () => {
8 | expect(numberChecker(10)).toEqual(true);
at Object.toEqual (03_numberChecker/numberChecker.spec.js:5:33)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 3 skipped, 4 total
Snapshots: 0 total
Time: 0.289 s
Ran all test suites matching /numberChecker.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/03_numberChecker$ npm test numberChecker.spec.js
> javascript-exercises@1.0.0 test
> jest numberChecker.spec.js
PASS 03_numberChecker/numberChecker.spec.js
numberChecker
✓ returns true when number is 1000 (2 ms)
○ skipped returns true when number is 10
○ skipped returns false when number is 9
○ skipped returns false when number is 6
Test Suites: 1 passed, 1 total
Tests: 3 skipped, 1 passed, 4 total
Snapshots: 0 total
Time: 0.291 s, estimated 1 s
Ran all test suites matching /numberChecker.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/03_numberChecker$ npm test numberChecker.spec.js
> javascript-exercises@1.0.0 test
> jest numberChecker.spec.js
PASS 03_numberChecker/numberChecker.spec.js
numberChecker
✓ returns true when number is 1000 (2 ms)
✓ returns true when number is 10 (1 ms)
✓ returns false when number is 9
✓ returns false when number is 6
Test Suites: 1 passed, 1 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: 0.28 s, estimated 1 s
Ran all test suites matching /numberChecker.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/03_numberChecker$ cd ..
offvault@Odintu:~/repos/javascript-exercises$ cd 04_mathEquations/
offvault@Odintu:~/repos/javascript-exercises/04_mathEquations$ npm test matchEquations.spec.js
> javascript-exercises@1.0.0 test
> jest matchEquations.spec.js
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/offvault/repos/javascript-exercises
86 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 39 matches
testPathIgnorePatterns: generators/ - 82 matches
testRegex: - 0 matches
Pattern: matchEquations.spec.js - 0 matches
offvault@Odintu:~/repos/javascript-exercises/04_mathEquations$ npm test mathEquations.spec.ks
> javascript-exercises@1.0.0 test
> jest mathEquations.spec.ks
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/offvault/repos/javascript-exercises
86 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 39 matches
testPathIgnorePatterns: generators/ - 82 matches
testRegex: - 0 matches
Pattern: mathEquations.spec.ks - 0 matches
offvault@Odintu:~/repos/javascript-exercises/04_mathEquations$ npm test mathEquations.spec.js
> javascript-exercises@1.0.0 test
> jest mathEquations.spec.js
FAIL 04_mathEquations/mathEquations.spec.js
● Test suite failed to run
ReferenceError: Cannot access 'f' before initialization
4 | const d = 5 % 4
5 | const e = b - 17
> 6 | const f = a + b + c + d + e + f
| ^
7 |
8 | // Do not edit below this line
9 | module.exports = {a, b, c, d, e, f}
at Object.f (04_mathEquations/mathEquations.js:6:31)
at Object.require (04_mathEquations/mathEquations.spec.js:1:28)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.371 s
Ran all test suites matching /mathEquations.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/04_mathEquations$ cd ..
offvault@Odintu:~/repos/javascript-exercises$ cd 05_joinStrings/
offvault@Odintu:~/repos/javascript-exercises/05_joinStrings$ npm test joinStrings.spec.js
> javascript-exercises@1.0.0 test
> jest joinStrings.spec.js
console.log
Hello! My name is Carlos Stevenson and I am 18 years old.
at Object.log (05_joinStrings/joinStrings.js:20:9)
PASS 05_joinStrings/joinStrings.spec.js
step 2
✓ firstName is Carlos (3 ms)
○ skipped lastName is Stevenson
○ skipped thisYear is 1965
○ skipped birthYear is 1947
○ skipped greeting is properly output
step 3
○ skipped fullName is Carlos Stevenson
○ skipped age is 18
Test Suites: 1 passed, 1 total
Tests: 6 skipped, 1 passed, 7 total
Snapshots: 0 total
Time: 0.447 s
Ran all test suites matching /joinStrings.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/05_joinStrings$ npm test joinStrings.spec.js
> javascript-exercises@1.0.0 test
> jest joinStrings.spec.js
console.log
Hello! My name is Carlos Stevenson and I am 18 years old.
at Object.log (05_joinStrings/joinStrings.js:20:9)
PASS 05_joinStrings/joinStrings.spec.js
step 2
✓ firstName is Carlos (2 ms)
✓ lastName is Stevenson
✓ thisYear is 1965 (1 ms)
✓ birthYear is 1947
✓ greeting is properly output (1 ms)
step 3
✓ fullName is Carlos Stevenson (1 ms)
✓ age is 18
Test Suites: 1 passed, 1 total
Tests: 7 passed, 7 total
Snapshots: 0 total
Time: 0.36 s, estimated 1 s
Ran all test suites matching /joinStrings.spec.js/i.
offvault@Odintu:~/repos/javascript-exercises/05_joinStrings$ ^C
offvault@Odintu:~/repos/javascript-exercises/05_joinStrings$