JSX (@JSX_2023) header
JSX (@JSX_2023) profile picture

Let's learn JavaScript!

Joined July 2023
🌟 Excited to share my #100DaysOfCode journey! 🚀I'm diving deep into JavaScript, tackling everything from fundamentals to advanced concepts. Each day brings new challenges and growth! Join me for daily updates, tips, and insights. Let’s code together and support each other! #JSX
15
Quiz Question on ES6+ Let's test your knowledge!🤔 What is the main advantage of using arrow functions in ES6? A) They can be used as constructors. B) They do not have their own `this` context. C) They are faster than traditional functions. Reply with your answer below! #Day8
5
ES6+ Features #Day8 Today focuses on several key features introduced in ECMAScript 2015 (ES6) and later versions, which enhance the functionality and expressiveness of JavaScript. The main topics include arrow functions, template literals, destructuring, spread and rest operators
3
Quiz time! #Day7 Test your DOM manipulation knowledge:What's wrong with this code snippet that's trying to change the text of a paragraph element? let para = document.getElementByID("myPara"); para.innerText = "New text"; Can you spot the error? 🤔 Answer coming up!
1
4
The code snippet has an error in the method name used to access a DOM element. The correct method is getElementById, but the code incorrectly uses getElementByID with an uppercase "ID". JavaScript is case-sensitive, and the method call will fail, resulting in para being null.
6
#Day7 of my JavaScript journey! Today I learned about DOM manipulation - how to dynamically change HTML elements using JavaScript. Some key takeaways:• The DOM (Document Object Model) represents the HTML document as a tree of objects 1/2
1
4
• We can select elements using methods like getElementById() and querySelector() • Properties like innerHTML and textContent let us modify element content • We can change styles with the style property • Methods like createElement() and appendChild() allow adding elements.
4
Top Hashtags for JavaScript on X: #javascript - The primary hashtag for all things related to JavaScript. #coding - Popular among developers sharing coding-related content. #programming - Broadly used for programming discussions, including JavaScript.
1
3
#developer - Ideal for posts related to software development. #webdevelopment - Specifically targets web development topics, including JavaScript frameworks and libraries. #webdeveloper - Focuses on web developers and their projects.
1
2
🤓Quiz time! #Day6 What's wrong with this event listener code? element.addEventListener('click', myFunction()); A) Nothing, it's correct B) Should be myFunction, not myFunction() C) 'click' should be in all caps D) addEventListener is not a valid method Reply with your answer!
1
7
Answer to #Day6 quiz: The correct answer is B!
10
#Day6 #100DaysOfCode: Event Handling 🖱️ Today we explored how to make web pages interactive using events. Key points: • Events are actions like clicks or key presses • Use addEventListener() to respond to events • Event objects contain info about what happened 1/2
1
9
• Event delegation for efficiency • Prevent default behaviours when needed 2/2 #JavaScript #100DaysOfCode #JSX
5
🧠 Quiz Time! #Day 5: DOM Manipulation What method would you use to select an element with a specific class name in JavaScript? A) `document.getElementById()` B) `document.querySelector()` C) `document.getElementsByClassName()` D) All of the above Comment answers below!👇#JSX
1
6
🔍 Quiz Answer Day 5: DOM Manipulation The correct answer is D) All of the above You can use: - `document.getElementById()` for selecting by ID, - `document.querySelector()` for selecting any CSS selector, - and `document.getElementsByClassName()` specifically for class names.
3
🚀 Day 5: DOM Manipulation in JavaScript! 🌐 Today, I'm diving into the Document Object Model (DOM) and how JS allows us to interact with HTML elements dynamically! 1/2 #JavaScript #100DaysOfCode #JSX #DAY5
1
1
4
The DOM represents the structure of a web page as a tree of objects, making it possible to change content, styles, and even structure on the fly. 2/2 #100DaysOfCode #JSX #Day5 #JavaScript
6
🧠Quiz Time! What does the `await` keyword do in an async function? A) It pauses the execution of the function until a Promise is resolved or rejected. B) It creates a new Promise. C) It defines a new function. D) It runs the function immediately. Reply with your answer below!
1
5
🎉 Quiz Answer! 🎉 The correct answer is A) It pauses the execution of the function until a Promise is resolved or rejected. Using `await` makes it easier to work with Promises by allowing you to write asynchronous code in a more synchronous style. #Day4 #JavaScript #JSX
10
🚀 **Day 4: Asynchronous JavaScript** 🚀 Asynchronous JavaScript is a powerful feature that allows us to perform multiple tasks simultaneously without blocking the execution of our code. Day 4 included Callbacks, Promises and Async/Await #Day4 #JavaScript #JSX
5
What will be the output of the following code? const fruits = ["apple", "banana", "cherry"]; fruits.push("orange"); console.log(fruits); A) `["apple", "banana", "cherry"]` B) `["apple", "banana", "cherry", "orange"]` C) `["orange", "apple", "banana", "cherry"]` D) `undefined`
1
4
Comment your answers below! 👇 #Day3 #JavaScript #JSX
1
4
Day 3: #JSX #100DaysOfCode 🚀 Today’s Focus: Arrays and Objects 🚀 On Day 3 of our JavaScript journey, we delved into two fundamental data structures: Arrays and Objects. Understanding these concepts is crucial for managing and organizing data effectively in your applications
4
📝 What will be the output of the following code snippet? javascriptfunction testHoisting() { console.log(myVar); // What will this log? var myVar = 5; } testHoisting(); Is it: A) undefined B) 5 C) ReferenceError Comment your answer below! 👇 #Day2 #JSX
1
7
The output of the provided JavaScript code snippet will be A) undefined. Explanation: In JavaScript, variable declarations using var are hoisted to the top of their containing function or global scope. However, only the declaration is hoisted, not the initialization.
2
Arrow Functions: A concise way to write functions with a lexical this. Scope Types: Discover global, function, and block scopes, and how they affect variable visibility. Hoisting: Understand how JavaScript hoists function declarations and variable declarations. #Day2 #JavaScript
1
Understanding scope is crucial as it determines where variables can be accessed within our code. 🔑 Key Takeaways: Function Declaration vs. Expression: Learn the difference between declaring functions and creating function expressions. 2/3 #JSX #Day2 #JavaScript
2
🚀 Day 2: Functions and Scope in JavaScript 🚀 Today, I dived into the world of functions and scope! Functions are reusable blocks of code that help us organise our logic and perform tasks efficiently. 1/3 #JSX #Day2 #JavaScript
4
🔍 Day1 Quiz Answer Reveal! The correct answer is A) true! 🎉 In JavaScript, the `==` operator checks for equality after converting both operands to a common type. Since `a` (a number) and `b` (a string) can be coerced into the same type, the comparison evaluates to true. #JSX
3
🧠 Day1 Quiz Time! Question: What will the following code output? let a = 5; let b = '5'; console.log(a == b); A) true B) false C) undefined D) Error What do you think? Comment your answers below! #Day1 #JSX #100DaysOfCode #JavaScript
6