Skip to content

JavaScript Basics


Learn the basics of JavaScript, including primary data types, conditionals and loops, and more.

Enroll Now
  • Estimated time
    1 month

  • Enroll by
    June 14, 2023

    Get access to classroom immediately on enrollment

  • Skills acquired
    JavaScript Data Structures, Control Flow in JavaScript

What You Will Learn

  1. JavaScript Basics

    1 month to complete

    Learn the basics of JavaScript. Students will learn how to create and use the primary data types in JavaScript and use conditionals and loops to control the flow of their JavaScript code. They’ll write their first JavaScript functions and learn how to use arrays and objects to store collections of data. By the end of the course, learners will use their new JavaScript knowledge to build the core functionality of an eCommerce shopping cart.

    Prerequisite knowledge

    No Experience Required.

    1. What is JavaScript

      Explain the history of JavaScript, run JavaScript code in the browser console and use console.log statements in JavaScript to log out values.

      • Data Types & Variables

        Declare variables in JavaScript to represent data. Define and use number, string, and Boolean data types. Use operators to manipulate numbers. Use string properties and methods to manipulate strings. Use strong and loose equality in comparisons.

        • Conditionals

          Add conditional logic to control program flow. Identify truthy and falsy values. Deploy ternary operators for more concise conditional logic and use switch statements to chain multiple else if conditions.

          • Loops

            Use for and while loops to reduce code duplication and automate repetitive tasks. Nest loops for more complex automation and use assignment operators to write more concise code.

            • Functions

              Create and run JavaScript functions to streamline and organize code. Use return statements to return items when a function runs. Explain how scope works in JavaScript. Use let and const in block scope. Store functions in variables using function expressions and use inline function expressions.

              • Arrays

                Create and use JavaScript arrays to store a collection of data. Use indexes to reference an array element. Deploy array properties and methods including length, push, pop, and splice to manipulate arrays. Loop through arrays using forEach and map.

                • Objects

                  Create and use JavaScript objects to store a collection of data as key:value pairs. Use dot notation and bracket notation to access object elements. Add and access methods in JavaScript objects.

                  • Course Project: Build a Shopping Cart

                    In this project, you'll use your JavaScript development skills to build the core functionality of an eCommerce shopping cart for Kirana’s fruit market. You will create a collection of products and then write the JavaScript code to add, remove, and change the quantity of a product in a shopping cart. You'll also write the JavaScript code for the checkout functions: making a purchase and returning change.

                  All Our Courses Include

                  • Real-world projects from industry experts

                    With real-world projects and immersive content built in partnership with top-tier companies, you’ll master the tech skills companies want.

                  • Real-time support

                    On demand help. Receive instant help with your learning directly in the classroom. Stay on track and get unstuck.

                  • Workspaces

                    Validate your understanding of concepts learned by checking the output and quality of your code in real-time.

                  • Flexible learning program

                    Tailor a learning plan that fits your busy life. Learn at your own pace and reach your personal goals on the schedule that works best for you.

                  Course offerings

                  • Class content

                    • Real-world projects
                    • Project reviews
                    • Project feedback from experienced reviewers
                  • Student services

                    • Student community
                    • Real-time support

                  Succeed with personalized services.

                  We provide services customized for your needs at every step of your learning journey to ensure your success.

                  Get timely feedback on your projects.

                  • Personalized feedback
                  • Unlimited submissions and feedback loops
                  • Practical tips and industry best practices
                  • Additional suggested resources to improve
                  • 1,400+

                    project reviewers

                  • 2.7M

                    projects reviewed

                  • 88/100

                    reviewer rating

                  • 1.1 hours

                    avg project review turnaround time

                  Learn with the best.

                  Learn with the best.

                  • James Parkes


                    James received his degree in Computer Science and Mathematics, then went on to become a Udacity instructor in several programs. His personal mission is clear: to open the doors of opportunity for others by empowering them with excellent educational experiences.

                  • Julia Van Cleve


                    Julia is a Content Developer at Udacity and was previously a middle school math teacher in San Jose, CA. She also dabbled in freelance web development, designing websites for small businesses in the Bay Area.

                  JavaScript Basics

                  Get started today

                    • Learn

                      Learn the basics of JavaScript, including primary data types, conditionals and loops, and more.

                    • Average Time

                      On average, successful students take 1 month to complete this program.

                    • Benefits include

                      • Real-world projects from industry experts
                      • Real-time support

                    Program Details

                    • Do I need to apply? What are the admission criteria?

                      No. This Course accepts all applicants regardless of experience and specific background.

                    • What are the prerequisites for enrollment?

                      No prior experience is required, but it is recommended that students are comfortable with basic computer skills, such as managing files, using third-party online programs, and navigating the Internet through an online browser. You will also need access to a video camera on a computer.

                    • How is this course structured?

                      This course is comprised of content and curriculum to support one project. We estimate that students can complete the program in one month.

                      The project will be reviewed by the Udacity reviewer network and platform. Feedback will be provided and if you do not pass the project, you will be asked to resubmit the project until it passes.

                    • How long is this course?

                      Access to this course runs for the length of time specified in the payment card above. If you do not graduate within that time period, you will continue learning with month to month payments. See the Terms of Use and FAQs for other policies regarding the terms of access to our programs.

                    • Can I switch my start date? Can I get a refund?

                      Please see the Udacity Program Terms of Use and FAQs for policies on enrollment in our programs.

                    • What software and versions will I need in this course?

                      There are no software and version requirements to complete this course. All coursework and projects can be completed via Student Workspaces in the Udacity online classroom. Udacity’s full technical requirements are listed here.

                    JavaScript Basics

                    Enroll Now