JS 100제 문제 34 sort 구현하기

이민정·2021년 4월 6일
0

JS100제

목록 보기
23/66

<풀이 코드>

	const n = prompt();
	const sor = n.split(' ').sort().join(' ');
	document.write(`${n}<br/>`);
	document.write(sor);
	if(n==sor){
		console.log("YES");
	}else{
		console.log("NO");
	}
profile
공부하자~!

0개의 댓글