diff --git a/ConditionalConquest/index.html b/ConditionalConquest/index.html index 5c0dfe6..83c6f20 100644 --- a/ConditionalConquest/index.html +++ b/ConditionalConquest/index.html @@ -56,6 +56,12 @@

+ +
+

MethodChaining

+ + +
\ No newline at end of file diff --git a/ConditionalConquest/script.js b/ConditionalConquest/script.js index 055aeea..3c77a33 100644 --- a/ConditionalConquest/script.js +++ b/ConditionalConquest/script.js @@ -69,11 +69,18 @@ document.addEventListener("DOMContentLoaded", function() { out.innerHTML += "Replace letter 'a' with 'o': " + text.replaceAll("a", "o") + "
"; out.innerHTML += "Fill till 15 with 'o': " + text.padStart(15, "o") + "
"; out.innerHTML += "Fill till 15 with 'o': " + text.padEnd(15, "o") + "
"; + out.innerHTML += "Slice: " + text.slice(0, 3) + "
"; }else{ out.innerHTML = ""; } }; + document.getElementById("MethodChaining").onclick = function(){ + let name = window.prompt("Please enter your gorgeous name!!"); + username = username.strim() + } + + });