02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoPrevious Video

From Rational to Boolean

All the operators we worked with so far returned in our trace panel a value of true or false. In this video we'll see that connection of our operators results in the Boolean data type as we explore storing our operator values into Boolean variables for reference.

We know how Boolean variables work with equality operators. Now we'll see how rational operators can be used in Boolean form. For example let's declare a few variables using var and assign values to them. Let the values be: a=5, b=10, c=b. Now we can compare these variables with one another and assign this comparison to another variable of type Boolean. Here's an example to understand this:

var isTrue: Boolean = (c<=a);

Here c<=a is what we want to find and we can find it directly. But if we want to change from rational to Boolean, we can use the above declaration.

So now the new Boolean variable is isTrue and we'll now work with this variable wherever we need to compare c<=a. The answer is still either true or false, depending upon the values: here the answer would be false as it does not satisfy the values of a and c. The advantage of changing from rational to Boolean is that we need not write the equality every time when we want to compare. We can just write trace(isTrue) to check whether the equation is satisfied or not. Here the equation is small and you may not find any difficulty, but when we deal with big equations, then this is definitely one of the best options to be considered.

Overview

What are operators and why do we need them to create programs. We'll discuss various types of operators and their uses later in this course

01:49

Default Values

To understand operators, we first need to understand how variables work -- mainly when it comes to default values and why they differ for various variable types.

06:41

Equality

In this video we will compare between equality and assignment and learn how to work with both. We also differentiate between the assignment operator (=) and the equality operator (==)

06:40

Rational Operators

In this video we will see how to check if a variable is: bigger, smaller, greater or equals, smaller or equals and so on..... using rational operators

05:52

From Rational to Boolean

All the operators we worked with so far returned in our trace panel a value of true or false. In this video we'll see that connection of our operators results to the Boolean data type as we explore

05:26

Equality Operators

So far we've seen how to compare and see if values differ or match but we did not have a way to ask if not. In this sample we'll look into the equality operator(make it a bit more complex)

05:59

Comparison Between Different Types

In the heart of programming is the capability to compare between things. In this video we talk about comparing between different variable data types.

04:15

Explicit Equality

Sometimes knowing if something is equal just isn't enough and we need to know if it is explicitly equal and that's where explicit equality operator comes in...

08:05

Logical Operator

Logical operators enable us to compare a few things at a time such as AND, OR and NOT. We will learn the syntax to represent these operators using few examples

09:52

There Are Many Ways To Say No

doing exactly the oposite of the logical logic seams crazy but actually its a very great way to get things done. Let us learn how to say no in terms of programming

04:15

Null vs. Undefined

Why are there two ways of saying nothing? I ponder that as well as I try to explain their roles. In the process, we will learn the syntax and its application in code

06:20