Day8 Create a Button

Objective

In this challenge, we practice creating buttons in JavaScript. Check out the attached tutorial for learning materials.


Day7 Regular Expressions II

Task

Complete the function in the editor below by returning a RegExp object, re, that matches any string s satisfying both of the following conditions:

  • String s starts with the prefix Mr., Mrs., Ms., Dr., or Er.
  • The remainder of string s (i.e., the rest of the string after the prefix) consists of one or more upper and/or lowercase English alphabetic letters (i.e., [a-z] and [A-Z]).

Day7 Regular Expressions III

Task

Complete the function in the editor below by returning a RegExp object, re, that matches every integer in some string s.


Constraints

  • The length of string s is >= 3.
  • It’s guaranteed that string s contains at least one integer.

Day7 Regular Expressions I

Objective

In this challenge, we use a Regular Expression to evaluate a string. Check out the attached tutorial for more details.


Task

Complete the function in the editor below by returning a RegExp object, re, that matches any string s that begins and ends with the same vowel. Recall that the English vowels are a, e, i, o, and u.


Day6 JavaScript Dates

Objective

In this challenge, we learn about JavaScript Dates. Check out the attached tutorial for more details.


Task

Given a date string, dateString, in the format MM/DD/YYYY, find and return the day name for that date. Each day name must be one of the following strings: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday. For example, the day name for the date 12/07/2016 is Wednesday.


Day6 Bitwise Operators

Objective

Today, we’re practicing bitwise operations. Check the attached tutorial for more details.


Task

We define S to be a sequence of distinct sequential integers from 1 to n; in other words, S = {1,2,3,…,n}. We want to know the maximum bitwise AND value of any two integers, a and b (where (a < b)), in sequence S that is also less than a given integer, k.

Complete the function in the editor so that given n and k, it returns the maximum a & b < k.

Note: The & symbol represents the bitwise AND operator.


Day5 Template Literals

Objective

In this challenge, we practice using JavaScript Template Literals. Check the attached tutorial for more details.


Day5 Inheritance

Objective

In this challenge, we practice implementing inheritance and use JavaScript prototypes to add a new method to an existing prototype. Check out the attached Classes tutorial to refresh what we’ve learned about these topics.


Day5 Arrow Functions

Objective

In this challenge, we practice using arrow functions. Check the attached tutorial for more details.


Task

Complete the function in the editor. It has one parameter: an array, nums. It must iterate through the array performing one of the following actions on each element:

  • If the element is even, multiply the element by 2.
  • If the element is odd, multiply the element by 3.

The function must then return the modified array.


Day4 Create a Rectangle Object

Objective

In this challenge, we practice creating objects. Check out the attached tutorial for more details.


Task

Complete the function in the editor. It has two parameters: and . It must return an object modeling a rectangle that has the following properties:

  • length : This value is equal to a.
  • width : This value is equal to b.
  • perimeter : This value is equal to 2 X (a + b)
  • area : This value is equal to a X b

Note: The names of the object’s properties must be spelled correctly to pass this challenge.


Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×