- Fundamental's of NodeJS.
- Basic understanding of eventloop.
- Basics of ES6.
- Working of REST api's.
- How to play CHESS game.
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
const arr = [1, 2, 4, 5, -3] | |
var sum = arr.reduce((a, b) => a + b, 0); |
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
/** | |
* Function returns true if string is palendrome | |
* @params {String} str | |
* @returns {Boolean} | |
*/ | |
function pal(str){ | |
return str === str.split('').reverse().join(''); | |
} |
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
const express = require('express') | |
const app = express() | |
app.get('/', (req, res) => res.send('Hello World!')) | |
app.listen(3000, () => console.log('Example app listening on port 3000!')) |
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
/** | |
* Creates all the sub arrays of a give array | |
* @params {Array} arr | |
* @returns {Array} | |
*/ | |
function getSubArray(arr){ | |
let arrLen = arr.length; | |
let result = []; | |
for(let subLen = degree; subLen <= arrLen; subLen++){ | |
for(let begin = 0; begin+subLen <=arrLen; begin++){ |