Home

Review Ticket

Week 5 Review Ticket: HTML Basics and JavaScript Fundamentals

In this review, we will cover essential concepts related to HTML and JavaScript fundamentals.

HTML Basics

HTML, which stands for HyperText Markup Language, is the backbone of web development. It uses opening and closing tags to structure content. Key HTML elements include:

JavaScript Data Types

JavaScript, a versatile programming language, offers various data types:

Using JavaScript with HTML DOM

Working with the Document Object Model (DOM) allows you to interact with HTML elements dynamically. Some key points:

Basics of JavaScript

JavaScript is commonly used for adding interactivity to web pages. Some foundational concepts:

JavaScript Errors

Let’s review and improve code segments to address common issues:

Segment 1: Alphabet List

Intended Behavior: Create a list of characters from the string contained in the variable alphabet.

What I Changed: The for loop’s condition should be i < alphabet.length to iterate over each character in alphabet. Instead of pushing i, which is a number, push alphabet[i] to add each character to alphabetList.

Segment 2: Numbered Alphabet

Intended Behavior: Print the number and corresponding character in alphabet based on letterNumber.

What I Changed: Adjusted the loop’s condition and corrected the console.log statement for accurate output.

Segment 3: Odd Numbers

Intended Behavior: Print all odd numbers below 10.

What I Changed: Adjusted the initialization and incrementation of i to produce odd numbers correctly.

Challenge Segment: Cost Calculator

Goal: Error-proof the code and implement a user input test.

What to Do: Develop tests for user inputs and expected outputs. Gradually implement features to pass these tests. Iterate until the program functions as expected.

This review ticket serves as a reference for understanding HTML basics, JavaScript data types, DOM manipulation, and common code debugging practices. Happy coding!

© 2024    •  Powered by Soopr   •  Theme  Moonwalk