diff --git a/README.md b/README.md new file mode 100644 index 0000000..64802d1 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Javascript Challenges +This book will challenge you to get and understand the most obscure and tricky parts of Javascript. +I hope you enjoy this book. diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..38b122b --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +* [Autoexecute function](autoexecute/README.md) \ No newline at end of file diff --git a/autoexecute/README.md b/autoexecute/README.md new file mode 100644 index 0000000..089bb9b --- /dev/null +++ b/autoexecute/README.md @@ -0,0 +1,29 @@ +# Javascript Self Invoking Functions + +Try this in your console +``` +function test() { alert('test'); }(); +``` +What happens? Why? + +--- + +Write the code to execute this function adding only one more character to the sentence. + +```js + +function test() { alert('test'); }(); + +``` + +```js + +!function test() { alert('test'); }(); + +``` + +```js +assert(true); +``` + +--- \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0056969 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "Javascript_Challenges", + "version": "0.0.1", + "description": "A bunch of Javascript Challenges", + "repository": { + "type": "git", + "url": "https://github.com/tcorral/Javascript-Challenges-book.git" + }, + "author": "Tomás Corral ", + "license": "Apache 2", + "dependencies": {}, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-gitbook": "0.1.2", + "grunt-gh-pages": "0.9.1", + "grunt-contrib-clean": "~0.5.0" + }, + "peerDependencies": { + "grunt": "~0.4.1" + } +} \ No newline at end of file