how to use inline if statements js code example Example: js inline if var a = 2; var b = 3; var c = ((a < b) ? 'minor' : 'major');