I created a new page in team site and dropped script editor web part. I am using the following code to read items from a list in SharePoint 2016 but it doesn't seem to work. It does show that jquery is loaded as well as alert(siteUrl) but after that there is another alert("testing") which it doesn't display. No error is shown either.
I can open page directly in browser if I type this URL:
Can you please check and let me know what am I doing wrong here?