Javascript Get Last Character Of String