Langsung ke konten utama

What is Declaration, Expression, and Statement

Declaration simply means initialization without value.
for example:
let x;

Expression is the operation being used to some primitive data types and will return a value result, like:

  • Numerical expression (10+30) 

  • String expression ("Hello" + "World!")
  • Boolean expression (a > b)
  • Conditional expression (age > 18 ? "allow":"exit")

while Statement is just a fancy word to combine both, like:

let x = "Hello" + "World!" // this whole line is called statement

Komentar

Postingan populer dari blog ini

how to install postgresql and use it with php on termux

first of all you need to install it: apt install postgresql then specify data dir for it by typing: initd -D YOUR_DATA_DIR example YOUR_DATA_DIR is /data/data/com.termux/files/home/mydb note that you don't need to make the dir first, you just need the dir name then initdb will create it automatically :) in this example like this: initdb -D /data/data/com.termux/files/home/mydb The files belonging to this database system will be owned by user "u0_a171". This user must also own the server process. The database cluster will be initialized with locale "C.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. creating directory test ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... sysv selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Jakarta creating configuration files...

Running proot program over termux xorg

  # Running xorg and xvfb on Termux pkg add tur-repo apt update -y && apt upgrade -y pkg install x11-repo # Mempermudah nantinya apt install fish starship pulseaudio tmux -y chsh -s fish exit # Kembali ke termux dan ini hasilnya: # Beri akses ke internal storage termux-setup-storage # Install xorg-server apt install xorg-server xorg-server-xvfb -y # Sampai sini harusnya akan ada error muncul jika mencoba menjalankannya: # Fix error dengan cara install mesa zink apt install mesa-zink/tur-packages # Install xwayland untuk termux-x11 apt install libwayland-protocols libepoxy xwayland # Download termux-x11 .zip dari github lalu extract file zip-nya dan install file termux-x11.apk dan .deb-nya (dengan cara dpkg -i file.deb) # Kenapa install dari github? Karna termux-x11-nightly dari repo termux bermasalah # Setelah semua selesai, tinggal install program yg membutuhkan X server, misalkan xterm (30MB) atau openbox (700MB) apt install xterm -y # Jalankan X11 DISPLAY=:0 termux-x11 #...

How to fix Apache httpd error: [:crit] [pid xxxx] (2)No such file or directory: AH00141: Could not initialize random number generator

How to fix Apache httpd error: [:crit] [pid xxxx] (2)No such file or directory: AH00141: Could not initialize random number generator. This error might be offen happen when using chroot  and no urandom in /dev folder of your chroot dir. Simply just mount the /dev folder to your chroot dir: mount -o bind /dev $chroot_dir/dev/ Then test it: httpd -v Server version: Apache/2.4.34 (Unix) Server built: Jul 19 2018 03:32:51