I’m a beginner and I keep getting errors when writing IF statements!
I think I’m writing the code correctly!
I get the error:
Uncaught SyntaxError: Unexpected token ‘{’
in the chrome console (see attached image)
Matt
console.log ("a")
markWeight = 78
johnWeight = 95
markHeight = 1.69
johnHeight = 1.95
let marksBmi
let johnsBmi
if (markWeight < markHeight) {
console.log("a");
} else {
console.log ("b")
}
let mBmi = markWeight / markHeight **2
console.log (`mark bmi ${mBmi}`)
let jBmi = johnWeight / johnHeight **2
console.log (`john bmi ${jBmi}`)
let markIsFat
If (10>5) {
markIsFat = "Mark is Fat"
console.log = markIsFat;
}