Skip to content

Instantly share code, notes, and snippets.

@HADMARINE
Last active July 2, 2020 05:59
Show Gist options
  • Save HADMARINE/2f2a59763f5baeecba3f077687d97175 to your computer and use it in GitHub Desktop.
Save HADMARINE/2f2a59763f5baeecba3f077687d97175 to your computer and use it in GitHub Desktop.
G....'s Not Unix!!!
function gnus_not_unix(str){
return str.replace(/GNU/gi, 'GNU\'s Not Unix')
}
function gnu_iter(str,cnt){
let _str = str;
for(let i = 0; i < cnt; i++){
_str = gnus_not_unix(_str);
}
return _str;
}
console.log(gnu_iter("GNU", 10));
@HADMARINE
Copy link
Author

Working at Node.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment