MEMO
프론트엔드
hls.js manifest load error 404 출력 시 리트라이.
Development
🔥 요약: 내가 아무리 리트라이를 설정해줘도 시도하지 않음. 그냥 다시 loadSource할 것.
MEMO
가격 표시하기
1toLocaleString()
2toLocaleString(locales)
3toLocaleString(locales, options)
4
5var number = 123456.789;
6
7// request a currency format
8console.log(number.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' }));
9// → 123.456,79 €
10
11// the Japanese yen doesn't use a minor unit
12console.log(number.toLocaleString('ja-JP', { style: 'currency', currency: 'JPY' }))
13// → ¥123,457
14
15// limit to three significant digits
16console.log(number.toLocaleString('en-IN', { maximumSignificantDigits: 3 }));
17// → 1,23,000
18
19// Use the host default language with options for number formatting
20var num = 30000.65;
21console.log(num.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}));
22// → "30,000.65" where English is the default language, or
23// → "30.000,65" where German is the default language, or
24// → "30 000,65" where French is the default language
천의 자리 단위로 쉼표 끊어줄 때 사용.
10000000 → 10,000,000
문자열 텍스트인 경우 parseInt 를 거쳐야 한다.
