JAVASCRIPT

JavaScript Tasks (Multiplication, Half of the sum, Find the perimeter and area, BMI (Body Mass Index), older than 16 years)

Task 1: Multiplication Objective: Display the result of multiplying two numbers. Code Solution: const a = 3; const b = 6; const multiplicationResult = a * b; console.log(“Multiplication Result:”, multiplicationResult); Explanation: This code multiplies a and b, then prints the result. Task 2: Half of the Sum Objective: Display half of the sum of two […]

JavaScript Tasks (Multiplication, Half of the sum, Find the perimeter and area, BMI (Body Mass Index), older than 16 years) Read Post »

JAVASCRIPT

HTML and CSS in JavaScript

The Role of HTML and CSS in JavaScript When building web pages, three main technologies work together: HTML, CSS, and JavaScript. Each plays a unique role, but they complement each other to create a smooth and engaging user experience. Let’s look at how they work individually and together. HTML (Hypertext Markup Language) HTML is the

HTML and CSS in JavaScript Read Post »

JAVASCRIPT

JavaScript Values

JavaScript Values A test passes when it should fail. A form accepts “0” as a missing field. A defect report says “the amount is wrong” but the number looks correct on screen. Almost every one of these traces back to a misunderstanding of how JavaScript values actually behave — not a logic error in the

JavaScript Values Read Post »

JAVASCRIPT

Differences Between document.write and console.log

document.write() vs. console.log() in JavaScript: What Each One Actually Does A third-party ad script wipes an entire production page. A defect ticket says “sensitive data was found in the browser console” during a HIPAA audit. Both incidents trace back to the same confusion: treating document.write() and console.log() as interchangeable “print something” commands. The document.write() vs.

Differences Between document.write and console.log Read Post »

JAVASCRIPT

Drawing a Fir Tree in JavaScript & Understanding String Escaping

JavaScript strings can sometimes be tricky, especially when it comes to backslashes (\). Let’s explore how this affects drawing a simple tree and learn about string escaping. The Problematic Code console.log(‘ /’); console.log(‘ / ‘); console.log(‘ / ‘); console.log(‘ / ‘); console.log(‘ ——‘); console.log(‘ ||’); At first glance, this code might look correct. However, if

Drawing a Fir Tree in JavaScript & Understanding String Escaping Read Post »

JAVASCRIPT

JavaScript Variable Types

JavaScript Variable Types A defect report says a discount field “isn’t calculating right.” Nine times out of ten, the root cause is a JavaScript variable holding the wrong type — a number stored as a string, a missing value read as undefined instead of zero. JavaScript variable types are the data categories a variable can

JavaScript Variable Types Read Post »

JAVASCRIPT

JS Frontend vs JS for Testing – First Steps

When starting with JavaScript (JS), you’ll quickly notice it has different uses, especially in frontend development and testing. Let’s dive into these two paths to understand what they entail, the tools you can use, and some practical examples to get you started. 1. JS for Frontend Development Frontend development with JavaScript is all about creating

, , ,

JS Frontend vs JS for Testing – First Steps Read Post »

JAVASCRIPT

JavaScript Display Options

Understanding display options will help you present data clearly. Here’s a simple guide on common JavaScript methods for displaying information: 1. console.log(): Debugging Helper The console.log() method is used mainly for debugging. It shows messages directly in the browser’s console, allowing you to check variable values, errors, and flow of execution without interrupting the user

,

JavaScript Display Options Read Post »

JAVASCRIPT

JavaScript

JavaScript, often abbreviated as JS, is one of the most widely used programming languages in the world today. It’s a versatile, dynamic scripting language primarily known for running inside web browsers to create interactive and engaging user experiences on websites. Whenever you visit a modern webpage and notice animations, interactive forms, dynamic content updates, or

,

JavaScript Read Post »

Scroll to Top