JS substring() 方法用於擷取兩個文字符(start, stop) - welcome to 東方視創~EVC Design studio~
16722
post-template-default,single,single-post,postid-16722,single-format-standard,woocommerce-demo-store,ajax_fade,page_not_loaded,,side_area_uncovered_from_content,columns-4,qode-theme-ver-9.2,wpb-js-composer js-comp-ver-4.11.2.1,vc_responsive

JS substring() 方法用於擷取兩個文字符(start, stop)

JS substring() 方法用於擷取兩個文字符(start, stop)

const str = ‘Mozilla’;

console.log(str.substring(1, 3));
// expected output: “oz”
//擷取第一個字元到第三個字元

console.log(str.substring(2));
// expected output: “zilla”

//擷取2以後的字元

No Comments

Sorry, the comment form is closed at this time.

商店新品上架中~有另外需求可以詢問喔!