Swap two numbers using third variable in JavaScript. var a =8, b= 17, temp; / / a = 8, b = 17 temp = a; a=b; b = temp; document.write("a = "+a+", b = "+b); Output: a = 17, b = 8 Is this snippet helpful? please comment below
Swap two numbers without using third variable in JavaScript: var a =8, b= 17; a = a+b; b = a-b; a = a-b; console.log("a = "+a+", b = "+b); Output: a = 17, b = 8
Save Conflict. Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes. Reason: Generally the above issue arises when a item/record of a SP list is used my two person or process (Workflows/Ms Flows) at same time. Solution: So Try to avoid update on same item by two or more user at same time. Try to use synchronous flow of process.
Redirect a webpage to another webpage using JavaScript We may able to use the below global object properties to redirect a page to another page on same Tab of a browser. window.location = "http://etechmate.blogspot.com"; OR window.location.href = "http://etechmate.blogspot.com"; OR window.location.replace("http://etechmate.blogspot.com"); Output: If we use any of above snippet code then it will open a webpage like etechmate.blogspot.com in same tab of the browser
Print elements of an array in JavaScript: //Example 1 var num = 5; var members = ['Parameswar','Minta','Raju','Indu','Chandan']; function printArrayElements(arr,n){ console.log('Elements of Array are:'); for(var i=0; i<n; i++){ console.log(arr[i]); } } printArrayElements(members,num); //Example 2 var n = 5; var numbers = [85,86,87,88,89]; function printElementsOfArray(arr,n){ console.log('Elements of Array are:'); arr.forEach(function(el,k){ console.log(el); }); } printElementsOfArray(numbers,n); Output of Example 1: Elements of Array are: Parameswar Minta Raju Indu Chandan Output of Example 2: Elements of Array are: 85 86 87 88 89 Is this blog helpful? Test
Print Elements of Array: Given an array Arr of size N , print all its elements. N = 7; var fruits = ['Mango', 'Apple','Pineapple','Orange','Papaya','Grapes','Banana']; Output : Mango Apple Pineapple Orange Papaya Grapes Banana N = 5; var numbers= [1,2,3,4,5]; Output : 1 2 3 4 5