Javascript and Java are alike each other, including control statements and String object.
All control statements such as if, for, while, swith in java also emerge in javascript .
Code Example:
Javascript is a weaky typed language that implies variables maybe equal even their types are not same.
code example:
type convention
parseInt/parseFloat.
constant
const PI=3.14