如何显示没有最后一个的所有长度?

How to display all length without the last?

var id = "YuvalW";
var c = id.substr(id.length - 1);
alert(c);

我只想显示 'Yuval' 而没有显示 'W' --- 我该怎么做?

var id = "YuvalW";
var c = id.substr(0, id.length - 1);
alert(c);