JavaScript Tutorials

JavaScript presents a systematic approach to learning dynamic web programming. Our tutorials cover JS fundamentals, DOM manipulation, and asynchronous programming, suitable for beginners and intermediate developers. Through hands-on labs and practical code examples, you'll gain experience in creating interactive web applications. Our JS playground allows you to experiment with JavaScript features and see real-time results.

Monty Hall Simulation Web App
Monty Hall Simulation Web App
Welcome to the Monty Hall Problem Simulation project. The Monty Hall problem is a probability puzzle based on a game show scenario. In this project, we'll guide you through creating a simple web-based simulation to demonstrate the puzzle. By the end, you'll have a functional Monty Hall simulation to test out the theory for yourself.
JavaScriptCSSHTML
Creating a Whack-a-Mole Web Game
Creating a Whack-a-Mole Web Game
In this project, you will learn how to create a Whack-a-Mole game using HTML, CSS, and JavaScript. The game involves whacking moles that randomly appear from holes within a specified time limit. You will create the necessary HTML, CSS, and JavaScript files and implement the game logic step by step.
JavaScriptCSSHTML
Build an VSCode Extension with ChatGPT
Build an VSCode Extension with ChatGPT
In this project, we will create a VSCode extension that lets the user adjust the heading level of selected Markdown text.
JavaScriptGit
Build a Tic-Tac-Toe Web App
Build a Tic-Tac-Toe Web App
In this project, you will learn how to create a Tic-Tac-Toe game using HTML, CSS, and JavaScript. Tic-Tac-Toe is a two-player game where players take turns marking X or O in a 3x3 grid. The objective is to get three marks in a row, either horizontally, vertically, or diagonally. You will create the necessary HTML, CSS, and JavaScript files and implement the game logic step by step.
CSSHTMLJavaScript
JavaScript Operators Introduction
JavaScript Operators Introduction
Welcome to the JavaScript documentation! This lab will give you an introduction to operators.
JavaScript
Check Yes/No String
Check Yes/No String
In this lab, we will explore a JavaScript code snippet designed to check if a string input represents a 'yes' or 'no' answer. The yesNo function uses regular expressions to test if the input matches 'y' or 'yes' for a true response, 'n' or 'no' for a false response, or a default value if none is provided. You will have the opportunity to test this function with different inputs and defaults, and gain a better understanding of how regular expressions can be used in JavaScript.
JavaScript
Word Wrap String
Word Wrap String
In this lab, we will be exploring the concept of string manipulation in JavaScript. Specifically, we will be focusing on the wordWrap function which allows us to wrap a string to a given number of characters using a string break character. By the end of this lab, you will have a better understanding of how to manipulate strings in JavaScript to achieve specific formatting requirements.
JavaScript
Introductory Programming Lab
Introductory Programming Lab
I'm sorry, but as an AI language model, I cannot confirm the existence of a specific programming lab content without additional information. Can you please provide me with the lab's name or any other relevant details?
JavaScript
Week of Year
Week of Year
In this lab, we will explore how to calculate the zero-indexed week of the year that a given date corresponds to using JavaScript. We will use the Date constructor and several Date.prototype methods to obtain the first Monday of the year and calculate the number of weeks between the first Monday and the given date. This lab is designed to enhance your understanding of JavaScript date manipulation and calculation.
JavaScript
Calculating Weighted Averages in JavaScript
Calculating Weighted Averages in JavaScript
In this lab, we will explore how to calculate the weighted average of two or more numbers using JavaScript. We will be using the Array.prototype.reduce() method to create the weighted sum of the values and the sum of the weights, and then divide them with each other to get the weighted average. This lab will help you understand the concept of a weighted average and how to implement it in JavaScript.
JavaScript
JavaScript Conditional Statements Introduction
JavaScript Conditional Statements Introduction
Welcome to the JavaScript documentation! This lab will give you an introduction to conditionals.
JavaScript
Weighted Random Sampling in JavaScript
Weighted Random Sampling in JavaScript
In this lab, we will explore a practical implementation of a weighted sample function in JavaScript. The function returns a random element from an array, with probabilities assigned to each element based on the provided weights. Through this lab, we will learn how to use Array methods such as reduce() and findIndex() along with Math.random() to generate the desired outcome.
JavaScript
Check if Value Is of Type
Check if Value Is of Type
In this lab, we will explore a JavaScript function that checks whether a provided value is of a specified type. We will use the is() function, which leverages the constructor property and Array.prototype.includes() method to determine if the value is of the specified type. This lab will help you gain a better understanding of type checking in JavaScript.
JavaScript
Calculating Euclidean Vector Distance in JavaScript
Calculating Euclidean Vector Distance in JavaScript
In this lab, we will dive into the world of JavaScript programming and explore the concept of vector distance. The purpose of the lab is to help you understand how to use Array.prototype.reduce(), Math.pow(), and Math.sqrt() to calculate the Euclidean distance between two vectors. By the end of the lab, you will have gained practical experience in implementing this useful function in JavaScript.
JavaScript
Function Currying in JavaScript
Function Currying in JavaScript
In this lab, we will explore the concept of function currying and uncurrying in JavaScript. Function currying is a technique that allows us to transform a function that takes multiple arguments into a sequence of functions that each take a single argument. On the other hand, function uncurrying is the process of transforming a sequence of functions that each take a single argument into a function that takes multiple arguments. Through this lab, we will learn how to implement both these techniques in JavaScript.
JavaScript
Vector Angle Calculation in JavaScript
Vector Angle Calculation in JavaScript
In this lab, we will explore the concept of vector angle and learn how to calculate the angle between two vectors using JavaScript. We will use various mathematical functions such as Math.pow(), Math.sqrt(), and Math.acos() to perform the necessary calculations and derive the desired result. Through this lab, we will gain a better understanding of vector operations and their practical applications.
JavaScript
Mapping Unique Array Values to Object Keys
Mapping Unique Array Values to Object Keys
In this lab, we will explore the concept of creating an object with the unique values of an array as keys and their frequencies as the values. We will achieve this by making use of the Array.prototype.reduce() method to map unique values to an object's keys, adding to existing keys every time the same value is encountered. Through this lab, we will gain a deeper understanding of the reduce method and how it can be used to solve programming problems efficiently.
JavaScript
Validating Numbers in JavaScript
Validating Numbers in JavaScript
In this lab, we will explore a JavaScript function that checks whether a given value is a number. We will use the parseFloat() method to convert the value to a number and then validate it using Number.isNaN() and Number.isFinite(). We will also use coercion to check if the value is a number. By the end of this lab, you will have a better understanding of how to validate numbers in JavaScript.
JavaScript
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 34
  • Next