Training day 16 - JavaScript Basic to Beginners
Heloo people!! Value Types: Number, String, Boolean, Symbol, Undefined, Null Reference Types: Objects, Functions, Arrays Functions are Objects. Arrays are also Objects. Therefore Reference types have only Objects technically. Primitives are copied by value. Objects are copied by their reference. const circle = { radius: 1, draw() { console.log('draw'); } } for (let key in circle) console.log(key, circle[key]) The above code is used to iterate...
Training day 15 - JavaScript Basic to Beginners
Heloo people!! Following notes: Objects If ax function is part of an object, in object oriented programming terms - it is called a method. Factory function These factory functions produce objects. function createCircle(radius) { return { radius: radius, draw: function() { console.log(‘draw’); } } } if key and value are same, we can directly use value - like this: function createCircle(radius) { return { radius,...
Training day 14 - JavaScript Basic to Beginners [Control Flow]
Heloo people!! I completed the Control flow part of the course. There were a few exercises in the end to practice what I learned in the course do far. It was fun, but I didn’t complete the whole course which I am aiming to do tomorrow. I got three parts left: Objects [2:30 hours] Arrays [2:30 hours] Functions [2:30 hours] I will track hours for...
Training day 13 - JavaScript Basic to Beginners
Heloo people!! I didn’t do much yesterday, just when through these concepts. If else Switch case For loop While Loop Do While Loop For in loop [keys/properties in object] For of loop [items in array] typeof I will continue the rest tomorrow. I will definitely complete this course. Byeee!
Training day 12 - JavaScript Basic to Beginners
Heloo people!! Following notes: Installed the Live Server extension on VS code which helps to run the code directly onto the browser. Usually we run the JavaScript on Browsers but the introduction of Node made it possible to run it outside of the browser. //Comments are wriiten like this in JavaScript Console.log(“Hello World”) “Hello World” is a string here. Separation of Concerns Separate HTML (Structure),...