Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const taskInstructions = ['Fix a bug and something something remote', 'Must push the new version to the cloud'];
- const actualTask = 'Fix a bug and push the new version to the remote';
- let titm = taskInstructions;
- let stm = actualTask.split(" ");
- let f = "";
- let i=0;
- for(let key in stm){
- for(let k in titm){
- let search=titm[k].search(stm[key]);
- if(search != -1){
- f = f + stm[key] + " ";
- titm[k]=titm[k].replace( stm[key], "" );
- }
- }
- i++;
- }
- if(i==stm.length){
- console.log(titm);
- console.log(f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement