github flow practice
github flow로 프로젝트를 수행해봅시다
Tasks
직접 실행해보고 동작 원리 파악하기
알고리즘 구현하기
구현된 알고리즘을 수행할 페이지 구현하기
github flow로 기능 단위별 브랜칭
issue와 projects로 프로젝트를 관리
template을 활용하여 issue와 project templating
https://airbnbfy.hanmesoft.com/
처음든 생각은
unicode에 3씩만 더해서 바꿔줬다.
<script>
const before = document.querySelector("#before");
const after = document .querySelector("#after");
document.querySelector("#convertBtn").addEventListener("click",function(){
const beforArray = (before.value).split("");
const afterArray = [];
beforArray.forEach((char)=>{
const uni = Number(char.charCodeAt(0));
console.log(uni);
//32는 공백, 46은 .
if(uni!=32 && uni!=46 && uni!=39 && uni!=34 && uni!=45 && uni!=40 && uni!=41 && uni!=33 && uni!=63 && uni!=44 && uni!=47 && uni!=92 && uni!=58 && uni!=59){
afterArray.push(String.fromCharCode(uni+2));
} else {
afterArray.push(String.fromCharCode(uni));
}
})
after.value = afterArray.join("");
})
</script>
여러가지 특수기호들은 제외시켰다.
더 긴 문장을 넣으면 읽기 어렵다. 뜻 전달도 안되는 정도.
3은 너무 큰 듯 해서 1, 2 정도 더해서 변환.
1 또는 2를 랜덤으로 던해서 반환 시킨다.