03: Simple Math and Strings

In this code sample you will learn what a string is and also how to do some simple math, as well as use a little bit of the Math library. As usual, you are to type this code in, get it working, and watch the video for additional information on these concepts. You should also attempt to break this code and change it in some way that you find interesting.

The Code

{{ ork.js() }}

In JavaScript there are a few ways to create a string. You can create a string with a single–quote 'Like this', with a double-quote "Like this", and in another way that you will learn about later in the course. Math and JavaScript use the same rules as your algebra class, where you used the acronym PEMDAS to figure out the order of operations. Remember that PEMDAS is more like PE(MD)(AS), meaning you do the parentheses, followed by exponents, followed by multiplication and division in order, followed by addition and subtraction in order. In some countries they use a different acronym for this, but it should be similar as math tends to be very universal.

80% Discount for Alpha 1

Register today for the early access release and get an 80% discount on the final release price. You'll get true lessons in true modules right now, and early access to content as it's released.

Still Not Sure? Check out more curriculum!