Reputation: 316
I've been working on a script, and I added an if statement and now it's generating the error "Illegally formed XML syntax". I've tried all sorts of variants on the if statement and can't get it to work. The error always points to the last line of the script, specifically the } bracket.
function readable() {
var roundTotal = 95
var readable
var score1 = "String1";
var score2 = "String2";
var score3 = "String3";
var score4 = "String4";
var score5 = "String5";
var score6 = "String6";
var score7 = "String7";
if (roundTotal =< 100 && => 90) {readable = score1}
else if (roundTotal =< 89 && => 80) {readable = score2}
else if (roundTotal =< 79 && => 70) {readable = score3}
else if (roundTotal =< 69 && => 60) {readable = score4}
else if (roundTotal =< 69 && => 50) {readable = score5}
else if (roundTotal =< 49 && => 30) {readable = score6}
else if (roundTotal =< 29 && => 0) {readable = score7}
DocumentApp.getUi().alert('Your Flesch Kinkaid Score is ' + readable + '');
}
Upvotes: 1
Views: 2178