This file contains 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
/** | |
* Definition for a binary tree node. | |
* function TreeNode(val) { | |
* this.val = val; | |
* this.left = this.right = null; | |
* } | |
*/ | |
/** | |
* @param {TreeNode} root | |
* @return {number} |
This file contains 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
'use strict'; | |
const sendgrid = require('sendgrid')(process.env.MAIL_KEY || 'may secrete key'); | |
function Mailer () { | |
this.sendMail = body => { | |
if(!this.verifyMailbody(body)) { | |
throw new TypeError('invalid body'); | |
} |
This file contains 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
let arr = new Array(4); for(let i = 0; i < 4; i++){ arr[i] = new Array(4); for(let j = 0; j < 4; j++){arr[i][j] = ‘[‘ + i + ‘,’ + j +’]’;}} |