Clear row if cell contains text

I should use a script to delete in a table the contents of the rows that contain a text in a cell. can you post the code?

function clearRows() {
var ss = SpreadsheetApp.openById(“codice sheet”);
var sh = ss.getSheetByName(“nome”);
var r = sh.getRange(‘A2:A’);
var v = r.getValues();
for(var i=v.length-1;i>=0;i–){
if(v[0,i]==‘’){

r.clearContent
}
}
}
I try to use this code but not working…thanks in advance

This is an AppSheet app forum. You should repost youyr request in a Google Apps Script forum for the best help.