๋ชฉ๋ก์ ‘๋ฏธ์‚ฌ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ (1)

๐Ÿค ์€์ง€log ๐Ÿค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ์ ‘๋ฏธ์‚ฌ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ

ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv.0 - ์ ‘๋ฏธ์‚ฌ์ธ์ง€ ํ™•์ธํ•˜๊ธฐ ๐Ÿ’š ๋ฌธ์ œ์„ค๋ช… ์–ด๋–ค ๋ฌธ์ž์—ด์— ๋Œ€ํ•ด์„œ ์ ‘๋ฏธ์‚ฌ๋Š” ํŠน์ • ์ธ๋ฑ์Šค๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜๋Š” ๋ฌธ์ž์—ด์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, "banana"์˜ ๋ชจ๋“  ์ ‘๋ฏธ์‚ฌ๋Š” "banana", "anana", "nana", "ana", "na", "a"์ž…๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด my_string๊ณผ is_suffix๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ, is_suffix๊ฐ€ my_string์˜ ์ ‘๋ฏธ์‚ฌ๋ผ๋ฉด 1์„, ์•„๋‹ˆ๋ฉด 0์„ return ํ•˜๋Š” solution ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”. ๐Ÿ’š ์ œํ•œ์กฐ๊ฑด 1 ≤ my_string์˜ ๊ธธ์ด ≤ 100 1 ≤ is_suffix์˜ ๊ธธ์ด ≤ 100 my_string๊ณผ is_suffix๋Š” ์˜์†Œ๋ฌธ์ž๋กœ๋งŒ ์ด๋ฃจ์–ด์ ธ ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿ’š ํ’€์ด function solution(my_string, is_suffix) { retu..