.So Javascript is the programming language. .Service Now is platform IT Departments at large institutions use to manage their computers,users,departments,tickets, and much much more. .So Learning JavaScript is a very fundamental important skill of being a Web Developer or Programmer. In regards to Arithmetic Operators, is just How to use math with JavaScript. If you remember PEMDAS , then you're good. .When would be use a module ? ( I asked myself that once a long time ago). If there's a 100 items, and i want to split in to dozens.How many would Can i make and how many left over 100/12 = 8.3333 (then round it down) , 100 & 12 = 4(Because 12*8=96, 100-96) Hope that answered some question atleast
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?
Hello! var isn't a string by default, it turns to one only if you add a string + number (e.g. "john" + 10, result: john10). In fact, if you only declare the var without a value, the type is undefined. In your example, the answer should be x = 20, where x is a number. Maybe this will help you: www.w3schools.com/js/js_variables.asp
@@Hatellen my be I will have a second attempt Elena, thank you for letting me know that var isn't a string be default. I am a novice in JavaScript. Thank you
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 + parseInt(fd_data._2__for_each.item.size_bytes); Return disk_bytes" It is in a for each logic ;-)
The variable only has the scope of the small bit of code (note that it is enclosed in a function.) When the function is done, it goes away. Check out Flow Variables (available in Quebec.)
@@ChuckTomasi it is within a flow variable in Quebec.. And no matter what I try I get an error. It is in a "For Each" flowlogic I want to add disk sizes together. But it looks like Flow Designer doesn't accept math ;-)
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!
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
I got 4 when it was 2+2, but then I removed that and did a+2 and got 14. You have them both listed so your output from gs.info() is going to display both. Hope that clears things up. Watch closely starting at 01:06. :)
"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!
Best instructor EVER! Thank you so much Chuck.
Best teacher EVER
Thank you
Great stuff, was not aware of Parenthesis usage in relation to mathematical order of processing.
true leader. baby steps to mastery.
Thank you
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.
Sure it can. Did I say something to the effect that it cannot?
Try c=++a
I love your videos but it would be a bit better to add why we would be using this. What is the overall goal?
.So Javascript is the programming language.
.Service Now is platform IT Departments at large institutions use to manage their computers,users,departments,tickets, and much much more.
.So Learning JavaScript is a very fundamental important skill of being a Web Developer or Programmer.
In regards to Arithmetic Operators, is just How to use math with JavaScript. If you remember PEMDAS , then you're good.
.When would be use a module ? ( I asked myself that once a long time ago). If there's a 100 items, and i want to split in to dozens.How many would Can i make and how many left over
100/12 = 8.3333 (then round it down) , 100 & 12 = 4(Because 12*8=96, 100-96)
Hope that answered some question atleast
Ohh goodness. I dont know if I can learn college algebra and this at the same time...
You can do it! Believe in yourself
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?
Hello! var isn't a string by default, it turns to one only if you add a string + number (e.g. "john" + 10, result: john10). In fact, if you only declare the var without a value, the type is undefined.
In your example, the answer should be x = 20, where x is a number.
Maybe this will help you: www.w3schools.com/js/js_variables.asp
@@Hatellen my be I will have a second attempt Elena, thank you for letting me know that var isn't a string be default. I am a novice in JavaScript. Thank you
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 + parseInt(fd_data._2__for_each.item.size_bytes);
Return disk_bytes"
It is in a for each logic ;-)
The variable only has the scope of the small bit of code (note that it is enclosed in a function.) When the function is done, it goes away. Check out Flow Variables (available in Quebec.)
@@ChuckTomasi it is within a flow variable in Quebec..
And no matter what I try I get an error.
It is in a "For Each" flowlogic I want to add disk sizes together. But it looks like Flow Designer doesn't accept math ;-)
@@damhoj how about a simple custom action?
👍
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!
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
I got 4 when it was 2+2, but then I removed that and did a+2 and got 14. You have them both listed so your output from gs.info() is going to display both. Hope that clears things up. Watch closely starting at 01:06. :)
@@ChuckTomasi Thank you!