progate java L1 basic summary console.log, difference between variables and constants, if statement

console.log Use with console.log (); Display in parentheses on the console As a caveat, if you want to display the character string, enclose the character string in "" like console.log ("").

○ console.log ("aiueo") ⇨ displayed as aiueo × console.log (aiueo) ⇨ reference error occurs

Declaration of values Variable let and constant const

When declaring a value, declare it with let or const

let numberA = 1; const numberB = 2;

There is a difference between the two, let can be updated but const cannot be updated

Update value

Variables can update their values let numberA = 1; At this point number A is 1,

numberA = 10; Now number A is 10 instead of

if statement

if (condition) {processing} ← do not add a semicolon {Processing} is executed when (condition) is satisfied

Example condition a> = b a is over a <b a is below b

Use else if to add more conditions else if (condition) {processing} ← do not add a semicolon

Use else to process when the condition is not met If all the if and else if conditions are not met, the else process is executed. else {processing}

Recommended Posts

progate java L1 basic summary console.log, difference between variables and constants, if statement
[Java] Difference between static final and final in member variables
Difference between variables and instance variables
[Java] Difference between assignment of basic type variable and assignment of reference type variable
[Java] Difference between Hashmap and HashTable
[JAVA] Difference between abstract and interface
[Java] Difference between array and ArrayList
[Java] Difference between Closeable and AutoCloseable
[Java] Difference between StringBuffer and StringBuilder
[Java] Difference between length, length () and size ()
Difference between final and Immutable in Java
[For beginners] Difference between Java and Kotlin
[Java] Differences between instance variables and class variables
[Note] Cooperation between Java and DB (basic)
Java basic learning content 1 (literals, variables, constants)
[Java] Difference between Intstream range and rangeClosed
Difference between int and Integer in Java
Basics of java basics ② ~ if statement and switch statement ~
[Java] Understand the difference between List and Set
[Java] Personal summary of classes and methods (basic)
Difference between next () and nextLine () in Java Scanner
[Java] Difference between "final variable" and "immutable object"
[Java] Basic summary of Java not covered by Progate ~ Part 1 ~
[JAVA] What is the difference between interface and abstract? ?? ??
What is the difference between Java EE and Jakarta EE?
[Java beginner] Difference between length and length () ~ I don't know ~
[Swift] Constants and variables
Difference between vh and%
[Java] Variables and types
Difference between i ++ and ++ i
[Java] Make variables in extended for statement and for Each statement immutable
Difference between Java and JavaScript (how to find the average)
[Java] Basic summary of Java not covered by Progate ~ Part 2 · List ~
[Java] Check the difference between orElse and orElseGet with IntStream
[Java] Difference between Stack Overflow Error and Out Of Memory Error
Is short-circuit evaluation really fast? Difference between && and & in Java