This page is using the info on javascript.info
if 10 < 5 {
// run some code here
}
This would not run the code because 10 is not less than 5.
if is the if / else.
if (43 < 2) {
// Run the code in here
} else {
// Run a different bit of code
}
Usually you can only have a string of text between it's open and closing quotes. However you can add a variable if you use backticks instead of quotes
let name = "John";
// embed a variable
alert( `Hello, ${name}!` );
Replace is a function can be used to replace any string or part of a string. Type this into the console.
let insult = 'u fuckin wanker';
insult.replace('wanker', 'arsehole');
u fuckin arsehole