Skip to content

Instantly share code, notes, and snippets.

View felixcatto's full-sized avatar
💭
🙃

Kositsky Alexandr felixcatto

💭
🙃
  • Russia, Saratov
View GitHub Profile
String.prototype.generateSubstrings = function() {
var string = this;
var stringLen = string.length;
var innerIterWtf = function(substrings, i, j) {
if (j == stringLen)
return substrings
else {
var substring = string.slice(i, j+1);
substrings.push(substring);
return innerIterWtf(substrings, i, j+1);
const [notifications, setNotifications] = React.useState([]);
const addNotification = () => {
setNotifications(mountNotification);
setTimeout(startAddAnimation, 0);
setTimeout(deleteNotification, autoremoveTimeout);
};