llen

1. 基本語法

llen(key , callback)

回傳串列長度,key值不存在則回傳0。

client.del('foo');

const foo_list = ['Hello', 'Such', 'A', 'Beautiful', 'World'];
client.rpush('foo', foo_list);
client.llen('foo', redis.print);
Reply: 5

Last updated

Was this helpful?