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
{ | |
"userId": 1, | |
"id": 1, | |
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", | |
"body": "awesome automation\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" | |
} |
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 fib(n){ | |
if (n<2) { | |
return 1; | |
} | |
else{ | |
return fib(n-1)+fib(n-2); | |
} | |
} |
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 fib(n){ | |
if (n<2) { | |
return n; | |
} | |
else{ | |
return fib(n-1)+fib(n-2); | |
} | |
} |
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 fib(n) | |
{ | |
let a = 1, b = 1, c; | |
if (n == 0) | |
return a; | |
for (let i = 2; i <= n; i++) | |
{ | |
c = a + b; | |
a = b; | |
b = c; |
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 fact(n) | |
{ | |
if (n <= 1) // This is the base case | |
return 1; | |
else | |
return n*fact(n-1); | |
} |
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
module.exports = { | |
javascript: "You Don't know JS", | |
getJavaScript: function(){ | |
return this.javascript; | |
} | |
}; | |
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
{ | |
"author": "Ambreen Khan", | |
"name": "fcc-learn-npm-package-json", | |
"dependencies": { | |
"express": "^4.14.0" | |
}, | |
"main": "server.js", | |
"scripts": { | |
"start": "node server.js" | |
}, |
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 courses = [ | |
['Programming', 'Java', 250 ], | |
['Automation', 'Selenium', 200], | |
['General','Communication Skills', 100] | |
] | |
const classesAsObject = courses.map(([category, name, price]) => { | |
return {category, name, price} ; | |
}); |
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 signup({coursename, username, email, password}){ | |
//Code goes here... | |
} | |
const student = { | |
username: 'testuser', | |
password: 'testpassword', | |
email: 'testuser@tesing.com', | |
coursename: 'Selenium' | |
} |
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 courses = [ | |
{category: 'Programming', name: 'Java', price: 250 }, | |
{category: 'Automation', name: 'Selenium', price: 200}, | |
{category: 'General', name: 'Communication Skills', price: 100} | |
] | |
const [ {name} ] = courses; | |
console.log(name); |
NewerOlder