- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:10 AM
var a = 3
var b = 3
if (a < b) {
gs.info('a is less than b');
} else if (a > b) {
gs.info('a is greater than b');
} else {
gs.info('it looks like a is equal to b');
}
Returns:
*** Script: a is greater than b
Suppose to return :
*** Script: it looks like a is equal to b
This is on Chuck's lesson 11 video Can't see where i'm going wrong ?
Learn JavaScript on the Now Platform: Lesson 11 -The If statement and Boolean logic (youtube.com)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:13 AM
Hi @argon blue
I am getting the expected results. I just copy pasted the script.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:16 AM
@argon blue Are you sure about the output, as I ran the same script and it shows the output
*** Script: it looks like a is equal to b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:13 AM
Hi @argon blue
I am getting the expected results. I just copy pasted the script.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:16 AM
@argon blue Are you sure about the output, as I ran the same script and it shows the output
*** Script: it looks like a is equal to b