function Dog(name) {
this.name = name;
this.speak = function() {
return this.name + " says woof";
}
}
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
| EPV(t) = E[points | d(t)] = E[points | macro in (t, t+ε], d(t)] × P(macro in t(t+ε] | d(t)) | |
| + e[points | micro in (t, t+ε], d(t)] × P(micro in t(t+ε] | d(t)) |
- Login to your GitHub account and create a new repository.
- Copy the generated URL which looks something like this: https://github.com/iamoperand/test123.git
- Now, create a new folder in your system.
- Open terminal in that location and then follow the following commands:
git init //to initialise GIT in the target location
git add --all //to add all the files (staging is what it means, done just before committing)
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
😄
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
| // The Problem | |
| function fn(val) { | |
| setTimeout(function() { | |
| console.log(val) | |
| }, val) | |
| } | |
| function executeAll() { | |
| fn(20) | |
| fn(20) |
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
| { | |
| "workbench.colorTheme": "Cobalt2", | |
| "files.autoSave": "onFocusChange", | |
| "editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 17, | |
| "editor.lineHeight": 25, | |
| "editor.letterSpacing": 0.5, | |
| "files.trimTrailingWhitespace": true, | |
| "editor.fontWeight": "400", | |
| "prettier.eslintIntegration": true, |
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
| //Fat-Arrow syntax | |
| var blog = { | |
| name: 'The School Of JS', | |
| topics: ['DOM', 'JS'], | |
| about: function () { | |
| return this.topics.map(topic => topic + ' is a topic of ' + this.name + ' blog!'); | |
| } | |
| }; | |
| blog.about(); |
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
| //Old syntax | |
| var blog = { | |
| name: 'The School Of JS', | |
| topics: ['DOM', 'JS'], | |
| about: function () { | |
| return this.topics.map(function (topic) { | |
| return topic + ' is a topic of ' + this.name + ' blog!'; | |
| }); | |
| } | |
| }; |
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 globalFunction() { | |
| console.log(this); | |
| } | |
| globalFunction(); //[object Window] | |
| //globalFunction() is equivalent to window.globalFunction() | |
| var myObj = {name: "obj"}; | |
| myObj.logThis = function () { | |
| console.log(this); |
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
| //Old syntax | |
| var name = function returnName (id) { | |
| return editors[id].name; | |
| } | |
| //Fat-Arrow syntax | |
| var name = id => editors[id].name; //implicit return |