Skip to content

Instantly share code, notes, and snippets.

Aaron Lo IllusionElements

  • Ottawa
Block or report user

Report or block IllusionElements

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.