Percentage command Problem

I keep getting an unexpected identifier don’t know where the problem is

If i remove both >" " the code works perfectly but i wanted to work with the both " "

$(eval random=Math.floor((Math.random()*100)+1); var randomPercent=random+"% “;random>=65?randomPercent+“Message1”:randomPercent+”, in the words of Albert Einstein “imagination is more important then knowledge” ")

@Cyrensy Heya, use " ` " ( backtick ) instead of any other quotation mark.

$(eval random=Math.floor((Math.random()*100)+1); var randomPercent = random + `% `; random >= 65 ? randomPercent + `Message1` : randomPercent + `, in the words of Albert Einstein "imagination is more important then knowledge"`)

Hope it will work.

3 Likes

Thank You! @Ritik_Ranjan

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.