What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-30 12:46:23
regex
Let regex; /* shorthand character classes */ regex = /d/; // matches any digit, short for [0-9] regex = /D/; // matches non-digits, short for [^0-9] regex = /S/; // matches non-white space character regex = /s/; // matches any white space character regex ... Add solution -
Javascript 2022-01-28 07:17:19
awaitmessages discord.js v12
// The provided set allows for responder error with an array of // answers permitted. Ideally, it would be best to place this in // a JSON file, which you can call quiz.json for simplicity. const quiz = require('./quiz.json'); const item = quiz[Math.flo... Add solution -
Javascript 2022-01-24 03:41:34
Write a shell script that takes two strings as input and determines whether two strings are the anagram.
function isAnagram(stringA, stringB) { // Sanitizing stringA = stringA.toLowerCase().replace(/[\W_]+/g, ""); stringB = stringB.toLowerCase().replace(/[\W_]+/g, ""); // sorting const stringASorted = stringA.split(""... Add solution -
Javascript 2022-01-23 08:45:58
copy two fields to one javascript
function generateFullName() { document.getElementById("username").innerText = document.getElementById("fName").value.toLowerCase() + "-" + document.getElementById("lName").value.toLowerCase(); } Add solution -
Other 2022-01-22 18:40:45
schema types
All Schema Types: required: boolean or function, if true adds a required validator for this property default: Any or function, sets a default value for the path. If the value is a function, the return value of the function is used as the default. select:... Add solution