Skip to content

Instantly share code, notes, and snippets.


Aaron Lo IllusionElements

  • Ottawa
View GitHub Profile
View index.html
<script crossorigin src=""></script>
<script crossorigin src=""></script>
<div id="root"></div>
View FreeCodeCamp API Call (OFFLINE)
View search.js
function replace(str, before, after) {
var aslice = after.slice(1);
if(before[0] === before[0].toUpperCase()){
var caps = after.charAt(0).toUpperCase() + aslice;
return str.replace(before, caps);
else if(after[0] === after[0].toUpperCase() && before[0] === before[0].toLowerCase()){
var low = after.charAt(0).toLowerCase() + aslice;
return str.replace(before, low);
You can’t perform that action at this time.