Skip to content

Instantly share code, notes, and snippets.

View felixcatto's full-sized avatar
💭
🙃

Kositsky Alexandr felixcatto

💭
🙃
  • Russia, Saratov
View GitHub Profile
const [notifications, setNotifications] = React.useState([]);
const addNotification = () => {
setNotifications(mountNotification);
setTimeout(startAddAnimation, 0);
setTimeout(deleteNotification, autoremoveTimeout);
};
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);