单项选择题
A.hello’.repeat(2)//"hellohello" B.na’.repeat(0)//"na" C.na’.repeat(2.9)//"nanana" D.na’.repeat(Infinity)//"nana......"
x’.repeat(3)返回xxx。
判断题x’.repeat(3)返回xxx。
endsWith():返回布尔值,表示参数字符串是否在原字符串的尾部。
判断题endsWith():返回布尔值,表示参数字符串是否在原字符串的尾部。
let s=’Hello world!’;s.startsWith(’Hello’)结果返回true。
判断题let s=’Hello world!’;s.startsWith(’Hello’)结果返回true。