<div class="chat-notification">
<div class="chat-notification-logo-wrapper">
<img class="chat-notification-logo" src="/img/logo.svg" alt="ChitChat Logo">
</div>
<div class="chat-notification-content">
<h4 class="chat-notification-title">ChitChat</h4>
<p class="chat-notification-message">You have a new message!</p>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const root = { | |
val: 1 | |
} | |
const node2 = { | |
val: 2, | |
returnNode: root | |
} | |
root.child = node2 | |
const node3 = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import WebKit | |
struct WebView: UIViewRepresentable { | |
class Coordinator: NSObject, WKNavigationDelegate, WKScriptMessageHandler { | |
var webView: WKWebView? | |
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
self.webView = webView | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function curry(func) { | |
return function curried(...args) { | |
// 1. if enough args, call func | |
// 2. if not enough, bind the args and wait for new one | |
if (args.length >= func.length) { | |
return func.apply(this, args) | |
} else { | |
return curried.bind(this, ...args) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const join = (a, b, c) => { | |
return `${a}_${b}_${c}` | |
} | |
const curriedJoin = curry(join) | |
curriedJoin(1, 2, 3) // '1_2_3' | |
curriedJoin(1)(2, 3) // '1_2_3' |