Skip to main content

Posts

Showing posts from December, 2020

Write a program to insert 5 elements in array and display it using javascript

A program to insert 5 elements in array and display it using javascript: var   numbers =[]; console . log ( numbers ); for ( var   i = 10 ;  i < 15 ;  i ++){      numbers . push ( i );  //Push method adds element at last index of an array. } console . log ( numbers ); console . log ( numbers . join ());  /* The elements will be separated by a specified                              separator using join() method.                             The default separator is comma (,).*/ Output:

How can we get SharePoint list name by GUID in jQuery?

 Get SharePoint list name by GUID in jQuery : Use the below snppet code & change the listGuid with your SP list GUID. var   listGuid  =  "aa4774cf-oa71-83e4-6a67-01b53d5a7y6i2" ; //use your own SP site list guid getlistNameByGUID ( listGuid ); function   getlistNameByGUID ( guid ) { $ . ajax ({          url :   _spPageContextInfo . siteAbsoluteUrl  +  "/_api/Web/Lists(guid'" + listGuid + "')" ,          method :   "GET" ,          headers :  {  "Accept" :   "application/json; odata=verbose"  },          success :   function  ( data ) {               console . log ( data . d . Title );         }, ...