JavaScript help - if TextEntry is empty fill it with a variable.

I want people to type their signature for a little game. It will be a little drag and drop think with their signature on. If they don´t type anything I want to fill the variable signature with something. Otherwise it´ll be blank. It works fine, but I don´t get the if-part to work. 


var player = GetPlayer();


if ("TextEntry" == "")

var TextEntry = "Harry"


player.SetVar("signature", TextEntry);



2 Replies