Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to use string operations in XSJS

$
0
0

Hi,

 

First of all, you need to know the difference between null and undefined in JavaScript. You can google the keyword "javascript null undefined". In your case, input1 is undefined. That's why the second if control is executed.

 

If you want to do something when input1 is not defined by the frontend user, you can use the following two logics.

 

if (input1 === undefined) {

     ...

}

 

OR

 

if (!input1) {

     //null or undefined

     ...

}

 

as the usual way.

 

Best regards,

Wenjun


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>