Freecodecamp: 정닡을 κ±°λΆ€ν•˜λŠ” ν”Œλž«νΌ

에 λ§Œλ“  2017λ…„ 01μ›” 25일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: freeCodeCamp/freeCodeCamp

λ¬Έμžμ—΄μ˜ μ±Œλ¦°μ§€
μ‚¬μš©μž μ—μ΄μ „νŠΈ: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 .
이 문제λ₯Ό μž¬ν˜„ν•˜λŠ” 방법을 μ„€λͺ…ν•˜κ³  κ°€λŠ₯ν•œ 경우 μŠ€ν¬λ¦°μƒ·μ— λŒ€ν•œ 링크λ₯Ό ν¬ν•¨ν•˜μ‹­μ‹œμ˜€.

λ‚΄ μ½”λ“œ:

var myStr = "FirstLine\n\\SeondLine\\\rThirdLine";
When running this in my web dev console i receive 
"FirstLine
\SecondLine\ThirdLine"

κ·ΈλŸ¬λ‚˜ λ‚˜λŠ”μ΄ μ½”λ“œλ₯Ό μ‹€ν–‰ν•˜λ©΄ \n λ³΄λ‹€λŠ” \r

var myStr = "FirstLine\n\\SeondLine\\\nThirdLine";
"FirstLine
\SecondLine\
ThirdLine"

λ‚΄κ°€ λ―ΏλŠ” 것은 μš°λ¦¬κ°€ μΆ”κ΅¬ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€ - λ‘˜ λ‹€ ν”Œλž«νΌμ—μ„œ μ‹€ν–‰λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

SeondLine μ‹€νŒ¨μ˜ 원인이 λ˜λŠ” μ˜€νƒ€κ°€ μ•„λ‹Œμ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.

λͺ¨λ“  3 λŒ“κΈ€

SeondLine μ‹€νŒ¨μ˜ 원인이 λ˜λŠ” μ˜€νƒ€κ°€ μ•„λ‹Œμ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.

μš”μ²­μ— 따라 더 λͺ…ν™•νžˆ ν•˜μ‹­μ‹œμ˜€.

ν”Œλž«νΌλ„ λ‚΄ λŒ€λ‹΅μ„ 받아듀이기λ₯Ό κ±°λΆ€ν•©λ‹ˆλ‹€. λ‚˜λŠ” μ‹œλ„ν–ˆλ‹€
var myStr='FirstLinen\SecondLine\nThirdLine';

ν‘œμ‹œλ˜λŠ” 좜λ ₯은
myStr="FirstLinen\SecondLine\nThirdLine"

μ˜ˆμƒ 좜λ ₯ λŒ€μ‹ . λ‚˜λŠ” μ±„νŒ…λ°©μ—μ„œ 도움을 μš”μ²­ν–ˆκ³  μ‚¬λžŒλ“€μ€ λ‚΄ μ½”λ“œλ₯Ό μ‹€ν–‰ν•  λ•Œ μ˜ˆμƒν•œ κ²°κ³Όλ₯Ό μ œκ³΅ν•œλ‹€κ³  λ§ν–ˆμŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰