JavaScript Numbers: Properties and Methods

Offered By
Coursera Project Network
In this Guided Project, you will:

Declare and use a variable with a number data type in JavaScript.

Write code using JavaScript number properties.

Write code using JavaScript number methods.

Clock2 hours
BeginnerBeginner
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this beginning-level project you will work with the number data type, and with properties and methods that apply to numbers. You will use Notepad++ to write JavaScript code and the Chrome browser to view your results. For a JavaScript programmer, understanding how to deal with variables that contain numbers is a prerequisite for any kind of number processing – even something as simple as accepting a number from a prompt() method and using it in a calculation. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

isNaN()Number()Javascript MethodstoString()JavaScript

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Write JavaScript code to declare a variable and then assign a number value to that variable.

  2. Use the Number() method to convert a value in a string variable to a number.

  3. Write JavaScript code to convert a number variable into a string variable using the toString() method.

  4. Use methods to check whether the value of a variable is an integer, or not a number at all.

  5. Experiment with number properties in JavaScript code.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.