Learn JavaScript on the Now Platform: Lesson 4 - Simple Arithmetic Operators

preview_player
Показать описание
This lesson covers some simple arithmetic operators to help you understand how to add, subtract, mulitply, divide, and modulo (the remainder of division). I also include some time saving shortcuts you won't want to miss.

Рекомендации по теме
Комментарии
Автор

"Now you know what it means and you will sound intelligent at cocktail parties. Because that's the value of all this education, right?"

Love this guy!

Viikinkipastori
Автор

Best instructor EVER! Thank you so much Chuck.

kimaly
Автор

Great stuff, was not aware of Parenthesis usage in relation to mathematical order of processing.

lonlandry
Автор

Increment of a (a++) cannot be stored in variable? ex: var a =12; var b = 3; var c = a++; then print c, the output is 12 instead 13.

kumarn-mu
Автор

I have run into a big problem when trying to add a value (disk size) in a flow designer "for each" logic.
How do I get this to work: "var disk_bytes = disk_bytes +
Return disk_bytes"
It is in a for each logic ;-)

damhoj
Автор

Hi Chuck, one more question please, i have 2 variables var a = 10, var b= 10, i did gs.info(a + b) and i got 1010 as javascript takes var as string by default, but when you did var a = 12 and when you performed gs.info(a + 2) why is it taking a as integer and giving 14?

sumanpalisetty
Автор

I love your videos but it would be a bit better to add why we would be using this. What is the overall goal?

theredpill
Автор

Ohh goodness. I dont know if I can learn college algebra and this at the same time...

theredpill
Автор

Would you please explain what is happening here? When I run the scripts, I get a slightly different result. For example, when Chuck runs the script:

// Assignment
var a = 12;
var b = 3:

// Addition
gs.info(2 + 2);
gs.info(a + 2);

He gets: *** Script: 4

However, I get:
x_859663_k_s_first: 4
x_859663_k_s_first: 14

raehart
Автор

Case:01
a = 1
b = 1
gs.info((++a + b++)*2);

Output: 6 (why not 8 😬? )

Case:02
Though this will return 8

a = 1
b = 1
b++
gs.info((++a + b)*2);

And here is 4 ? 🤔
a = 1
b = 1
b - -
gs.info((++a + b++)*2);

takeaway from LS04 - nothing can take over parenthesis. Thanks!

AbhishekPandey-pplz
join shbcf.ru