10 | This file lets you play with JavaScript easily. 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /Ch05/05_01/transcript.js: -------------------------------------------------------------------------------- 1 | for (let i = 0; i < 10; i += 1) { 2 | console.log(i); 3 | } 4 | 5 | // very common use case: looping over an array. 6 | var pageNames = [ 7 | "Home", 8 | "About Us", 9 | "Contact Us", 10 | "JavaScript Playground", 11 | "News", 12 | "Blog" 13 | ]; 14 | for (i = 0; i < pageNames.length; i += 1) { 15 | if (document.title === pageNames[i]) { 16 | console.log("We ARE here: " + pageNames[i]); 17 | } else { 18 | console.log("We are not here: " + pageNames[i]); 19 | } 20 | } 21 | 22 | // don't repeat yourself: 23 | var pageNames = [ 24 | "Home", 25 | "About Us", 26 | "Contact Us", 27 | "JavaScript Playground", 28 | "News", 29 | "Blog" 30 | ]; 31 | for (i = 0; i < pageNames.length; i += 1) { 32 | var currentPageTitle = pageNames[i]; 33 | 34 | if (document.title === currentPageTitle) { 35 | console.log("We ARE here: " + currentPageTitle); 36 | } else { 37 | console.log("We are not here: " + currentPageTitle); 38 | } 39 | } 40 | 41 | // More info: 42 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement 43 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for 44 | -------------------------------------------------------------------------------- /Ch05/05_02/transcript.js: -------------------------------------------------------------------------------- 1 | // iterate over an array 2 | var pageNames = [ 3 | "Home", 4 | "About Us", 5 | "Contact Us", 6 | "JavaScript Playground", 7 | "News", 8 | "Blog", 9 | ]; 10 | 11 | for (let i = 0; i < pageNames.length; i += 1) { 12 | console.log(i, pageNames[i]); 13 | } 14 | 15 | for (var p in pageNames) { 16 | console.log(p, pageNames[p]); 17 | } 18 | 19 | for (var v of pageNames) { 20 | console.log(v); 21 | } 22 | 23 | // iterate over an object 24 | var pages = { 25 | first: "Home", 26 | second: "About Us", 27 | third: "Contact Us", 28 | fourth: "JavaScript Playground", 29 | fifth: "Blog", 30 | }; 31 | for (var p in pages) { 32 | if (pages.hasOwnProperty(p)) { 33 | console.log(p, pages[p]); 34 | } 35 | } 36 | 37 | // More info: 38 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in 39 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of 40 | -------------------------------------------------------------------------------- /Ch05/05_03/transcript.js: -------------------------------------------------------------------------------- 1 | // This array has two copies of its first item 2 | let myList = [1, 1, 2, 3, 5, 8, 13, "fibonacci"]; 3 | 4 | // The same thing using the Set API 5 | let mySet = new Set(); 6 | mySet.add(1); 7 | mySet.add(1); // this won't change mySet, since 1 is already in there 8 | mySet.add(2); 9 | mySet.add(3); 10 | // ... this gets tedious 11 | 12 | // An array can be turned into a set 13 | // If you want to quickly remove all duplicates from an array, this is a good tool! 14 | let mySet2 = new Set(myList); 15 | 16 | mySet2.has(3); // true 17 | mySet2.has(12); // false 18 | 19 | // For...of loop iteration works 20 | for (let item of mySet2) { 21 | console.log('mySet contains', item); 22 | } 23 | 24 | // This object is a bird 25 | var bird = { 26 | genus: "corvus", 27 | species: "corvax", 28 | commonName: "raven", 29 | }; 30 | 31 | // Here is a map using the same structure 32 | var birdMap = new Map(); 33 | birdMap.set("genus", "corvus"); 34 | birdMap.set("species", "corvax"); 35 | birdMap.set("commonName", "raven"); 36 | 37 | birdMap.get("genus"); // 'corvus' 38 | 39 | birdMap.has("genus"); // true 40 | birdMap.has("corvus"); // false (keys only) 41 | 42 | // for...of loops work on Maps, with key and value returned 43 | for (let value of birdMap) { 44 | console.log(value); 45 | } 46 | 47 | birdMap.entries(); 48 | 49 | Object.entries(bird); 50 | 51 | birdMap2 = new Map(Object.entries(bird)); -------------------------------------------------------------------------------- /Ch05/05_04/transcript.js: -------------------------------------------------------------------------------- 1 | // for loop 2 | for (let i = 0; i < 10; i += 1) { 3 | console.log(i); 4 | } 5 | 6 | // same thing as a while loop 7 | let i = 0; 8 | while (i < 10) { 9 | console.log(i + "... This will go until we hit 10"); 10 | i += 1; 11 | } 12 | 13 | var myList = [true, true, true, false, true, true]; 14 | 15 | var myItem = null; 16 | 17 | while (myItem !== false) { 18 | console.log( 19 | "myList has " + 20 | myList.length + 21 | " items now. This loop will keep going until we pop a false." 22 | ); 23 | myItem = myList.pop(); 24 | } 25 | 26 | var counter = 1; 27 | while (true) { 28 | console.log(counter); 29 | counter++; 30 | break; // comment out this break statement to make this loop go forever and potentially lock up your web browser 31 | } 32 | 33 | var myList = [true, true, true, false, true, true]; 34 | 35 | var myItem = false; 36 | do { 37 | console.log( 38 | "myList has " + 39 | myList.length + 40 | " items now. This loop will go until we pop a false." 41 | ); 42 | myItem = myList.pop(); 43 | } while (myItem !== false); 44 | 45 | // More info: 46 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while 47 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/do...while 48 | -------------------------------------------------------------------------------- /Ch06/06_01/transcript.js: -------------------------------------------------------------------------------- 1 | console.log('Arf'); 2 | console.log('Woof'); 3 | console.log('Meow'); 4 | console.log('Moooooooooooo'); 5 | 6 | function speak() { 7 | console.log('Arf'); 8 | console.log('Woof'); 9 | console.log('Meow'); 10 | console.log('Moooooooooooo'); 11 | } 12 | 13 | speak(); 14 | 15 | // Function expression assigned to a variable 16 | const speak = function() { 17 | console.log('Arf'); 18 | console.log('Woof'); 19 | console.log('Meow'); 20 | console.log('Moooooooooooo'); 21 | } 22 | 23 | // More info: 24 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions 25 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function 26 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function -------------------------------------------------------------------------------- /Ch06/06_02/transcript.js: -------------------------------------------------------------------------------- 1 | fuddify("Be very quiet, I'm hunting rabbits."); 2 | fuddify("You screwy rabbit."); 3 | fuddify("Rabbit tracks!"); 4 | 5 | function fuddify(speech) { 6 | // if it's not a string, return an error message 7 | if (typeof speech !== "string") { 8 | console.error("Nice twy, wabbit!"); 9 | return; 10 | } 11 | 12 | // otherwise, make it sound like Elmer Fudd 13 | speech = speech.replace(/r/g, "w"); 14 | speech = speech.replace(/R/g, "W"); 15 | 16 | return speech; 17 | } 18 | 19 | var utterance = fuddify("You screwy rabbit"); 20 | utterance; 21 | 22 | function isEven(num) { 23 | if (num % 2 === 0) { 24 | return true; 25 | } else { 26 | return false; 27 | } 28 | } 29 | 30 | isEven(12); 31 | 12 % 2; 32 | 33 | function isEven(num) { 34 | return num % 2 === 0; 35 | } 36 | 37 | // More info: 38 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions 39 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function -------------------------------------------------------------------------------- /Ch06/06_03/transcript.js: -------------------------------------------------------------------------------- 1 | function speakSomething(what = "Default speech", howMany = 10) { 2 | for (var i = 0; i < howMany; i += 1) { 3 | console.log(what + " (" + i + ")"); 4 | } 5 | } 6 | 7 | speakSomething("Good morning", 5); 8 | speakSomething("Good morning"); 9 | speakSomething(); 10 | 11 | function addingMachine() { 12 | // initialize the total we'll be returning 13 | var total = 0; 14 | 15 | for (var i = 0; i < arguments.length; i += 1) { 16 | // grab the next number 17 | var number = arguments[i]; 18 | 19 | // check if the argument is a number. 20 | // if so, add it to the running total 21 | if (typeof number === "number") { 22 | total += number; 23 | } 24 | } 25 | 26 | // done - return the total 27 | return total; 28 | } 29 | 30 | addingMachine(1, 2, 3); 31 | addingMachine(1, 2, 3, 4, 5, 6, 7, 8, 9, 1204910249014); 32 | 33 | // More info: 34 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions 35 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function -------------------------------------------------------------------------------- /Ch06/06_04/transcript.js: -------------------------------------------------------------------------------- 1 | var calvin = { 2 | name: "Calvin", 3 | bestFriend: "Hobbes", 4 | form: "human boy", 5 | }; 6 | 7 | // you can also pass an object to a function 8 | // because objects are using a copy of a reference, the argument will be modified 9 | function transmogrifier(calvin) { 10 | if (typeof calvin !== "object") { 11 | console.error("Calvin is not an object."); 12 | return; 13 | } 14 | 15 | // generate a random number between 1 and 5 16 | var randomNumber = Math.floor(Math.random() * 5) + 1; 17 | 18 | switch (randomNumber) { 19 | case 1: 20 | calvin.form = "tyrannosaurus"; 21 | break; 22 | case 2: 23 | calvin.form = "grey wolf"; 24 | break; 25 | case 3: 26 | calvin.form = "bengal tiger"; 27 | break; 28 | case 4: 29 | calvin.form = "grizzly bear"; 30 | break; 31 | case 5: 32 | calvin.form = "canary"; 33 | break; 34 | default: 35 | // he stays human 36 | calvin.form = "human boy"; 37 | break; 38 | } 39 | } 40 | 41 | // this version of the transmogifier does return a copy, leaving the original alone 42 | function transmogrifyCopy(calvin) { 43 | if (typeof calvin !== "object") { 44 | console.error("Calvin is not an object."); 45 | return; 46 | } 47 | 48 | // generate a random number between 1 and 5 49 | var randomNumber = Math.floor(Math.random() * 5) + 1; 50 | 51 | var newForm = calvin.form; // by default, do not change 52 | 53 | switch (randomNumber) { 54 | case 1: 55 | newForm = "tyrannosaurus"; 56 | break; 57 | case 2: 58 | newForm = "grey wolf"; 59 | break; 60 | case 3: 61 | newForm = "bengal tiger"; 62 | break; 63 | case 4: 64 | newForm = "grizzly bear"; 65 | break; 66 | case 5: 67 | newForm = "canary"; 68 | break; 69 | default: 70 | // he stays human 71 | newForm = "human boy"; 72 | break; 73 | } 74 | 75 | // return a new object that's just like calvin, 76 | // but transmogrified! 77 | return { 78 | name: calvin.name, 79 | bestFriend: calvin.bestFriend, 80 | form: newForm, 81 | }; 82 | } 83 | 84 | // More info: 85 | // https://en.wikipedia.org/wiki/Calvin_and_Hobbes 86 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions 87 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function 88 | -------------------------------------------------------------------------------- /Ch06/06_05/transcript.js: -------------------------------------------------------------------------------- 1 | function speakSomething(what = 'Speaking!') { 2 | for (var i = 0; i < 10; i += 1) { 3 | console.log(what); 4 | } 5 | } 6 | 7 | var speakSomething = function(what = 'Speaking!') { 8 | for (var i = 0; i < 10; i += 1) { 9 | console.log(what); 10 | } 11 | }; 12 | 13 | setTimeout(speakSomething, 5000); 14 | 15 | var obj = { 16 | sayHello: function() { 17 | console.log("Hello"); 18 | } 19 | }; 20 | 21 | obj.sayHello(); 22 | 23 | // More info: 24 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions 25 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function 26 | // https://developer.mozilla.org/en-US/docs/Glossary/Hoisting -------------------------------------------------------------------------------- /Ch06/06_07/transcript.js: -------------------------------------------------------------------------------- 1 | // Shim allowing this code to work in a browser as well as node 2 | if (!global && typeof window !== 'undefined') { 3 | var global = window; 4 | } 5 | 6 | var myNum = 32; 7 | var myResult = "Success!"; 8 | 9 | function randomizer(limit) { 10 | var randomNumber = Math.floor(Math.random() * limit); 11 | 12 | var myNum = randomNumber; 13 | 14 | console.log("Local myNum is", myNum); 15 | console.log("Global myNum is", global.myNum); 16 | 17 | console.log("Our result is", myResult); 18 | 19 | return myNum; 20 | } 21 | 22 | randomizer(10); 23 | 24 | function doubleIt(num) { 25 | var myNum = num * 2; 26 | 27 | return myNum; 28 | } 29 | 30 | if (1 === 1) { 31 | const oneIsOne = 'Yes indeed.'; 32 | console.log('One is one, right?', oneIsOne); 33 | } 34 | 35 | console.log('One is still one, right?', oneIsOne); // ReferenceError 36 | 37 | // More info: 38 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#function_scope 39 | // http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let 40 | // http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const -------------------------------------------------------------------------------- /Ch06/06_08/transcript.js: -------------------------------------------------------------------------------- 1 | // Before: 2 | const speak = function () { 3 | console.log("Arf"); 4 | console.log("Woof"); 5 | console.log("Meow"); 6 | console.log("Moooooooooooo"); 7 | }; 8 | 9 | // After: 10 | const speak = () => { 11 | console.log("Arf"); 12 | console.log("Woof"); 13 | console.log("Meow"); 14 | console.log("Moooooooooooo"); 15 | }; 16 | 17 | // Before: 18 | function isEven(num) { 19 | return num % 2 === 0; 20 | } 21 | 22 | // After: 23 | let isEven = (num) => { 24 | return num % 2 === 0; 25 | }; 26 | 27 | // or: 28 | isEven = (num) => num % 2 === 0; 29 | 30 | // And most succinctly: 31 | // prettier-ignore 32 | isEven = num => num % 2 === 0; 33 | 34 | // More info: 35 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions 36 | -------------------------------------------------------------------------------- /Ch06/06_09/transcript.js: -------------------------------------------------------------------------------- 1 | // function addingMachine(...terms) 2 | 3 | function addingMachine(...terms) { 4 | // initialize the total we'll be returning 5 | var total = 0; 6 | 7 | // this used to be `arguments` instead of `terms` 8 | for (var i = 0; i < terms.length; i += 1) { 9 | // grab the next number 10 | var number = terms[i]; 11 | 12 | // check if the argument is a number. 13 | // if so, add it to the running total 14 | if (typeof number === "number") { 15 | total += number; 16 | } 17 | } 18 | 19 | // done - return the total 20 | return total; 21 | } 22 | 23 | function bake(temp = 350, time = 35, ...flavors) { 24 | console.log(`Let's bake this cake at ${temp} degrees,`); 25 | console.log(`for ${time} minutes\n`); 26 | 27 | if (flavors.length > 0) { 28 | console.log("And let's not forget these flavors", flavors); 29 | } 30 | 31 | console.log("Arguments contains everything", arguments); 32 | } 33 | 34 | bake(425, 30, 'chocolate', 'lemon', 'black forest'); 35 | bake(300, 30, 'vanilla'); 36 | bake(); 37 | 38 | // More info: 39 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters 40 | -------------------------------------------------------------------------------- /Ch06/06_10/transcript.js: -------------------------------------------------------------------------------- 1 | function doubleIt(number) { 2 | return (number *= 2); 3 | } 4 | 5 | var myNumbers = [1, 2, 3, 4, 5]; 6 | 7 | var myDoubles = myNumbers.map(doubleIt); 8 | 9 | myNumbers.forEach(function (number) { 10 | console.log("My array contains", number); 11 | }); 12 | 13 | myNumbers.forEach((number) => { 14 | console.log("My array contains", number); 15 | }); 16 | 17 | // this is a browser-based example 18 | const myTextField = document.getElementById("myTextField"); 19 | myTextField.addEventListener("keyup", () => { 20 | console.log("Someone is typing!"); 21 | }); 22 | 23 | // https://developer.mozilla.org/en-US/docs/Glossary/Callback_function 24 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map 25 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach 26 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every 27 | -------------------------------------------------------------------------------- /Ch07/07_02/examples.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Callbacks 3 | */ 4 | 5 | // With one, it's simple enough 6 | jQuery.get("https://httpbin.org/get?data=1", function(response) { 7 | // Now I have some data 8 | }); 9 | 10 | // Callbacks get nested ad infinitum 11 | jQuery.get("https://httpbin.org/get", function(response) { 12 | // Now I have some data 13 | 14 | jQuery.get("https://httpbin.org/get", function(response) { 15 | // Now I have some more data 16 | 17 | jQuery.get("https://httpbin.org/get", function(response) { 18 | // Now I have even more data! 19 | }); 20 | }); 21 | }); 22 | 23 | /** 24 | * Promises 25 | */ 26 | 27 | // One Promise 28 | axios.get("https://httpbin.org/get").then(function(response) { 29 | // now I have some data 30 | }); 31 | 32 | // Multiple promises in sequence, no nesting 33 | axios 34 | .get("https://httpbin.org/get") 35 | .then(function(response) { 36 | // now I have some data 37 | 38 | return axios.get("https://httpbin.org/get"); 39 | }) 40 | .then(function(response) { 41 | // now I have some data 42 | 43 | return axios.get("https://httpbin.org/get"); 44 | }); 45 | 46 | /** 47 | * Async / Await 48 | */ 49 | 50 | // One request 51 | async function getOneThing() { 52 | var response = await axios.get("https://httpbin.org/get"); 53 | 54 | // now I have some data 55 | } 56 | 57 | // Multiple requests 58 | async function getLotsOfThings() { 59 | var response1 = await axios.get("https://httpbin.org/get"); 60 | var response2 = await axios.get("https://httpbin.org/get"); 61 | var response3 = await axios.get("https://httpbin.org/get"); 62 | 63 | // Now I have lots of data 64 | } 65 | -------------------------------------------------------------------------------- /Ch07/07_03/examples.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Classes 3 | */ 4 | 5 | let Cake = {}; 6 | 7 | Cake.prototype.bake = function(temp, minutes) { 8 | // Bake a cake at a particular temperature 9 | // for a number of minutes 10 | } 11 | 12 | class CakeClass { 13 | bake(temp, minutes) { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | LinkedIn Learning Exercise Files License Agreement 2 | ================================================== 3 | 4 | This License Agreement (the "Agreement") is a binding legal agreement 5 | between you (as an individual or entity, as applicable) and LinkedIn 6 | Corporation (“LinkedIn”). By downloading or using the LinkedIn Learning 7 | exercise files in this repository (“Licensed Materials”), you agree to 8 | be bound by the terms of this Agreement. If you do not agree to these 9 | terms, do not download or use the Licensed Materials. 10 | 11 | 1. License. 12 | - a. Subject to the terms of this Agreement, LinkedIn hereby grants LinkedIn 13 | members during their LinkedIn Learning subscription a non-exclusive, 14 | non-transferable copyright license, for internal use only, to 1) make a 15 | reasonable number of copies of the Licensed Materials, and 2) make 16 | derivative works of the Licensed Materials for the sole purpose of 17 | practicing skills taught in LinkedIn Learning courses. 18 | - b. Distribution. Unless otherwise noted in the Licensed Materials, subject 19 | to the terms of this Agreement, LinkedIn hereby grants LinkedIn members 20 | with a LinkedIn Learning subscription a non-exclusive, non-transferable 21 | copyright license to distribute the Licensed Materials, except the 22 | Licensed Materials may not be included in any product or service (or 23 | otherwise used) to instruct or educate others. 24 | 25 | 2. Restrictions and Intellectual Property. 26 | - a. You may not to use, modify, copy, make derivative works of, publish, 27 | distribute, rent, lease, sell, sublicense, assign or otherwise transfer the 28 | Licensed Materials, except as expressly set forth above in Section 1. 29 | - b. Linkedin (and its licensors) retains its intellectual property rights 30 | in the Licensed Materials. Except as expressly set forth in Section 1, 31 | LinkedIn grants no licenses. 32 | - c. You indemnify LinkedIn and its licensors and affiliates for i) any 33 | alleged infringement or misappropriation of any intellectual property rights 34 | of any third party based on modifications you make to the Licensed Materials, 35 | ii) any claims arising from your use or distribution of all or part of the 36 | Licensed Materials and iii) a breach of this Agreement. You will defend, hold 37 | harmless, and indemnify LinkedIn and its affiliates (and our and their 38 | respective employees, shareholders, and directors) from any claim or action 39 | brought by a third party, including all damages, liabilities, costs and 40 | expenses, including reasonable attorneys’ fees, to the extent resulting from, 41 | alleged to have resulted from, or in connection with: (a) your breach of your 42 | obligations herein; or (b) your use or distribution of any Licensed Materials. 43 | 44 | 3. Open source. This code may include open source software, which may be 45 | subject to other license terms as provided in the files. 46 | 47 | 4. Warranty Disclaimer. LINKEDIN PROVIDES THE LICENSED MATERIALS ON AN “AS IS” 48 | AND “AS AVAILABLE” BASIS. LINKEDIN MAKES NO REPRESENTATION OR WARRANTY, 49 | WHETHER EXPRESS OR IMPLIED, ABOUT THE LICENSED MATERIALS, INCLUDING ANY 50 | REPRESENTATION THAT THE LICENSED MATERIALS WILL BE FREE OF ERRORS, BUGS OR 51 | INTERRUPTIONS, OR THAT THE LICENSED MATERIALS ARE ACCURATE, COMPLETE OR 52 | OTHERWISE VALID. TO THE FULLEST EXTENT PERMITTED BY LAW, LINKEDIN AND ITS 53 | AFFILIATES DISCLAIM ANY IMPLIED OR STATUTORY WARRANTY OR CONDITION, INCLUDING 54 | ANY IMPLIED WARRANTY OR CONDITION OF MERCHANTABILITY OR FITNESS FOR A 55 | PARTICULAR PURPOSE, AVAILABILITY, SECURITY, TITLE AND/OR NON-INFRINGEMENT. 56 | YOUR USE OF THE LICENSED MATERIALS IS AT YOUR OWN DISCRETION AND RISK, AND 57 | YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE THAT RESULTS FROM USE OF THE 58 | LICENSED MATERIALS TO YOUR COMPUTER SYSTEM OR LOSS OF DATA. NO ADVICE OR 59 | INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM US OR THROUGH OR 60 | FROM THE LICENSED MATERIALS WILL CREATE ANY WARRANTY OR CONDITION NOT 61 | EXPRESSLY STATED IN THESE TERMS. 62 | 63 | 5. Limitation of Liability. LINKEDIN SHALL NOT BE LIABLE FOR ANY INDIRECT, 64 | INCIDENTAL, SPECIAL, PUNITIVE, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING 65 | BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER 66 | INTANGIBLE LOSSES . IN NO EVENT WILL LINKEDIN'S AGGREGATE LIABILITY TO YOU 67 | EXCEED $100. THIS LIMITATION OF LIABILITY SHALL: 68 | - i. APPLY REGARDLESS OF WHETHER (A) YOU BASE YOUR CLAIM ON CONTRACT, TORT, 69 | STATUTE, OR ANY OTHER LEGAL THEORY, (B) WE KNEW OR SHOULD HAVE KNOWN ABOUT 70 | THE POSSIBILITY OF SUCH DAMAGES, OR (C) THE LIMITED REMEDIES PROVIDED IN THIS 71 | SECTION FAIL OF THEIR ESSENTIAL PURPOSE; AND 72 | - ii. NOT APPLY TO ANY DAMAGE THAT LINKEDIN MAY CAUSE YOU INTENTIONALLY OR 73 | KNOWINGLY IN VIOLATION OF THESE TERMS OR APPLICABLE LAW, OR AS OTHERWISE 74 | MANDATED BY APPLICABLE LAW THAT CANNOT BE DISCLAIMED IN THESE TERMS. 75 | 76 | 6. Termination. This Agreement automatically terminates upon your breach of 77 | this Agreement or termination of your LinkedIn Learning subscription. On 78 | termination, all licenses granted under this Agreement will terminate 79 | immediately and you will delete the Licensed Materials. Sections 2-7 of this 80 | Agreement survive any termination of this Agreement. LinkedIn may discontinue 81 | the availability of some or all of the Licensed Materials at any time for any 82 | reason. 83 | 84 | 7. Miscellaneous. This Agreement will be governed by and construed in 85 | accordance with the laws of the State of California without regard to conflict 86 | of laws principles. The exclusive forum for any disputes arising out of or 87 | relating to this Agreement shall be an appropriate federal or state court 88 | sitting in the County of Santa Clara, State of California. If LinkedIn does 89 | not act to enforce a breach of this Agreement, that does not mean that 90 | LinkedIn has waived its right to enforce this Agreement. The Agreement does 91 | not create a partnership, agency relationship, or joint venture between the 92 | parties. Neither party has the power or authority to bind the other or to 93 | create any obligation or responsibility on behalf of the other. You may not, 94 | without LinkedIn’s prior written consent, assign or delegate any rights or 95 | obligations under these terms, including in connection with a change of 96 | control. Any purported assignment and delegation shall be ineffective. The 97 | Agreement shall bind and inure to the benefit of the parties, their respective 98 | successors and permitted assigns. If any provision of the Agreement is 99 | unenforceable, that provision will be modified to render it enforceable to the 100 | extent possible to give effect to the parties’ intentions and the remaining 101 | provisions will not be affected. This Agreement is the only agreement between 102 | you and LinkedIn regarding the Licensed Materials, and supersedes all prior 103 | agreements relating to the Licensed Materials. 104 | 105 | Last Updated: March 2019 106 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2023 LinkedIn Corporation 2 | All Rights Reserved. 3 | 4 | Licensed under the LinkedIn Learning Exercise File License (the "License"). 5 | See LICENSE in the project root for license information. 6 | 7 | Please note, this project may automatically load third party code from external 8 | repositories (for example, NPM modules, Composer packages, or other dependencies). 9 | If so, such third party code may be subject to other license terms than as set 10 | forth above. In addition, such third party code may also depend on and load 11 | multiple tiers of dependencies. Please review the applicable licenses of the 12 | additional dependencies. 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Learning the JavaScript Language 2 | This is the repository for the LinkedIn Learning course Learning the JavaScript Language. The full course is available from [LinkedIn Learning][lil-course-url]. 3 | 4 | ![Learning the JavaScript Language][lil-thumbnail-url] 5 | 6 | JavaScript is one of the most popular programming languages in the world, used to create dynamic websites along with a host of other applications. And like any language—whether spoken language or programming language—it takes time and practice to become conversant. In this course, Joe Chellman teaches you how to “speak” JavaScript by familiarizing yourself with the most commonly encountered topics and concepts. Joe starts out with some basic JavaScript syntax and jargon, then covers what you need to know about in the JavaScript toolbox, including variables, types, objects, arrays, operators, control structures, loops, and functions. Join Joe in this course to start your path toward JavaScript fluency and unlock the power of this popular language. 7 | 8 | 9 | ### Instructor 10 | 11 | Joe Chellman 12 | 13 | Web Developer 14 | 15 | 16 | 17 | Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/joe-chellman). 18 | 19 | [lil-course-url]: https://www.linkedin.com/learning/learning-the-javascript-language-22309208?dApp=59033956&leis=LAA 20 | [lil-thumbnail-url]: https://media.licdn.com/dms/image/D560DAQEpa5LhtPUlUg/learning-public-crop_675_1200/0/1683586021773?e=2147483647&v=beta&t=vRDAZPrFPLsfXDXkELzJbOrrJL7wKNCAAkAro6e2Fpw 21 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LinkedInLearning/learning-the-javascript-language-4369302/9998fbd5acbe838b56aa09cd811e4107316fac02/favicon.ico -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learningjs-exercise-files", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "learningjs-exercise-files", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "prettier": "^2.8.1", 13 | "readline-sync": "^1.4.10" 14 | } 15 | }, 16 | "node_modules/prettier": { 17 | "version": "2.8.2", 18 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz", 19 | "integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==", 20 | "bin": { 21 | "prettier": "bin-prettier.js" 22 | }, 23 | "engines": { 24 | "node": ">=10.13.0" 25 | }, 26 | "funding": { 27 | "url": "https://github.com/prettier/prettier?sponsor=1" 28 | } 29 | }, 30 | "node_modules/readline-sync": { 31 | "version": "1.4.10", 32 | "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz", 33 | "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==", 34 | "engines": { 35 | "node": ">= 0.8.0" 36 | } 37 | } 38 | }, 39 | "dependencies": { 40 | "prettier": { 41 | "version": "2.8.2", 42 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.2.tgz", 43 | "integrity": "sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==" 44 | }, 45 | "readline-sync": { 46 | "version": "1.4.10", 47 | "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz", 48 | "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==" 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learningjs-exercise-files", 3 | "version": "1.0.0", 4 | "description": "Exercise files for Learning the JavaScript Language", 5 | "author": "Joe Chellman", 6 | "license": "ISC", 7 | "dependencies": { 8 | "prettier": "^2.8.1", 9 | "readline-sync": "^1.4.10" 10 | } 11 | } 12 | --------------------------------------------------------------------------------