A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.
Single line comments start with //
. For multi-line commands, you use /* ... */
// This is a single line comment
let departments = [ | |
{ name: 'CSE', student: 7000}, | |
{ name: 'EEE', student: 2000}, | |
{ name: 'CSIT', student: 5000}, | |
{ name: 'ME', student: 4500}, | |
{ name: 'ENGLISH',student: 6000}, | |
{ name: 'BBA', student: 8000}, | |
{ name: 'LAW', student: 2500} | |
]; |
let numbers = [1,2,3,4,5,6,7,8,9]; | |
let newNumbers = numbers.map(function(item){ | |
return item+5; | |
}); | |
console.log(newNumbers); | |
/// OUTPUT: [6, 7, 8, 9, 10, 11, 12, 13, 14] | |
/** | |
* আরো সহজ ভাবে es6 এ অ্যারো ফাংশন ব্যবহার করে | |
* লিখাযায় |
let arr= [1,2,3,4,5,6,7,8,9,10]; | |
let newArr = arr.map(item => { | |
return item % 2 == 0? item * item : item; | |
}); | |
console.log(newArr); | |
/// OUTPUT: [1, 4, 3, 16, 5, 36, 7, 64, 9, 100] |
/** | |
* Create a student class and two overloading constructor which are takes parameters, | |
* create array of object and set two constructor dynamically and print information. | |
**/ | |
#include<iostream> | |
using namespace std; | |
class student | |
{ |
const express = require('require'); | |
const app = express(); | |
const bodyParser = require('body-parser'); | |
const morgan = require('morgan'); | |
const port = process.env.PORT || 8080; | |
app.use(bodyParser.urlencoded({extended:false})); | |
app.use(bodyParser.json()); | |
app.use(morgan('dev')); |
Setter/Tester tips are shared here -> https://gist.github.com/shashank21j/64830e7e3dab96a2ccb8
Creating a Contest on HackerRank is an easy process which is divided in 2 steps.
#1. Create a Challenge