Skip to content
the poor coder

freecode camp first line second line javascript

Poor Man
Published
Reading time
1 min read
On this page

My Experience with Freecode Camp's First Line, Second Line and JavaScript#

When I first started learning to code, I was overwhelmed with the different programming languages and frameworks available. That's when I stumbled upon Freecode Camp, a free online coding bootcamp that teaches you everything you need to know to become a full-stack developer. One of the first things I learned in Freecode Camp was the concept of first line, second line, and JavaScript.

What is First Line and Second Line?#

In HTML, the first line is usually the DOCTYPE declaration which tells the browser what type of document it is reading. The second line is usually the HTML tag which wraps around the entire HTML document. It is important to include both the DOCTYPE declaration and HTML tag at the beginning of your HTML document for it to be valid.

Text

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <title>My Webpage</title>
        </head>
        <body>
            <h1>Hello World!</h1>
        </body>
    </html>

What is JavaScript?#

JavaScript is a programming language that is used to create dynamic and interactive websites. It can be used to add functionality to your HTML and CSS code, such as creating pop-up windows, validating form data, and creating animations.

One of the basic concepts of JavaScript is variables, which are used to store data. You can declare a variable using the var keyword, followed by the variable name and an optional initial value. For example:

Text

    var myName = "Raju";

You can also use JavaScript to manipulate the HTML and CSS of your webpage. For example, you can use the document.getElementById() method to select an HTML element by its ID and change its contents:

Text

    document.getElementById("myHeading").innerHTML = "Hello World!";

Overall, learning about the first line, second line, and JavaScript was a great foundation for my journey to becoming a full-stack developer. Freecode Camp's hands-on approach to learning allowed me to apply these concepts in real-world scenarios and helped me build my coding skills.

Keep going

2023

how to sort an array

How to Sort an Array If you have an array and you want to order its elements in a specific way, you need to use a sorting algorithm. There are several sorting algorithms available, but two of the most commonly used are…

javascript2 min read
2023

jquery mobile or desktop

jQuery Mobile or Desktop? As a web developer, I have had some experience with both jQuery Mobile and jQuery Desktop. Both frameworks have their pros and cons, and which one to use really depends on the specific project…

javascript1 min read
2023

node.js folder structure

Node.js Folder Structure If you are new to Node.js, it can be daunting to create a folder structure that will work for your project. The structure you choose will depend on the size and complexity of your project. Here…

javascript1 min read
ESC