how to get first character of string in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first character of string in react js, use substring() method to extracts first character from string. You have to only pass starting and ending postion of string so for first character pass 0, 1 as parameter it will return first character of string. Let鈥檚 see short example to use substring() to get first character from string. text.substring(0, 1); Today, I鈥檓 going to show you How do I get first character of string in react js, as above mentioned, I鈥檓 going to use the above-mentioned substring() method....

August 14, 2022聽路聽2 min聽路聽Infinitbility

how to get first character of string in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first character of string in react native, use substring() method to extracts first character from string. You have to only pass starting and ending postion of string so for first character pass 0, 1 as parameter it will return first character of string. Let鈥檚 see short example to use substring() to get first character from string. text.substring(0, 1); Today, I鈥檓 going to show you How do I get first character of string in react native, as above mentioned, I鈥檓 going to use the above-mentioned substring() method....

August 14, 2022聽路聽2 min聽路聽Infinitbility

how to get first two character of string in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first two character of string in react native, use substring() method to extracts first two character from string. You have to only pass starting and ending postion of string so for first two character pass 0, 2 as parameter it will return first two character of string. Let鈥檚 see short example to use substring() to get first two character from string....

August 14, 2022聽路聽1 min聽路聽Infinitbility

how to get first character of string in javascript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first character of string in javascript, use substring() method to extracts first character from string. You have to only pass starting and ending postion of string so for first character pass 0, 1 as parameter it will return first character of string. Let鈥檚 see short example to use substring() to get first character from string. text.substring(0, 1); Today, I鈥檓 going to show you How do I get first character of string in javascript, as above mentioned, I鈥檓 going to use the above-mentioned substring() method....

August 13, 2022聽路聽2 min聽路聽Infinitbility

how to get first character of string in typescript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first character of string in typescript, use substring() method to extracts first character from string. You have to only pass starting and ending postion of string so for first character pass 0, 1 as parameter it will return first character of string. Let鈥檚 see short example to use substring() to get first character from string. text.substring(0, 1); Today, I鈥檓 going to show you How do I get first character of string in typescript, as above mentioned, I鈥檓 going to use the above-mentioned substring() method....

August 13, 2022聽路聽2 min聽路聽Infinitbility

how to get json array length in javascript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get length of json array in javascript, use .length property it will return number of element avaialable in json array. Let鈥檚 see how to use .length property in json array variable. let arr = ["Infinitbility", "aGuideHub", "SortoutCode"]; console.log(arr.length); // Output // 3 Today, I鈥檓 going to show you How do I get json array length in javascript, as above mentioned, I鈥檓 going to use the above-mentioned Array....

August 12, 2022聽路聽1 min聽路聽Infinitbility

how to get value from json array in javascript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get value from json array in javascript, we have two ways use index number to single specfic value from json array use for loop to get all values from json array Let鈥檚 see short example to use index number and for loop on json array. let arr = ["Infinitbility", "aGuideHub", "SortoutCode"]; // used `index` number console.log(arr[1]); // Output // aGuideHub // used `for` loop for(let value of arr) { console....

August 12, 2022聽路聽2 min聽路聽Infinitbility

how to remove item from object in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To remove item from object in react js, use delete keyword it will remove key value pair from object only you have to mantion delete keyword with key. Let鈥檚 see how to use delete keyword to remove item from object. let exampleObject = { id: 1, name: "infinitbility", error: "Feild required" }; console.log("exampleObject", exampleObject); // Output // 'exampleObject' { // id: 1, // name: 'infinitbility', // error: 'Feild required' // } delete exampleObject....

August 10, 2022聽路聽2 min聽路聽Infinitbility

how to remove item from object in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To remove item from object in react native, use delete keyword it will remove key value pair from object only you have to mantion delete keyword with key. Let鈥檚 see how to use delete keyword to remove item from object. let exampleObject = { id: 1, name: "infinitbility", error: "Feild required" }; console.log("exampleObject", exampleObject); // Output // 'exampleObject' { // id: 1, // name: 'infinitbility', // error: 'Feild required' // } delete exampleObject....

August 10, 2022聽路聽2 min聽路聽Infinitbility

how to handle apostrophe in javascript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To handle apostrophe ( single quote, or double quote ) in javascript, use the ( \ ) Escape characters or ( ` ) Template literals it will handle both types quotes single and double. Let鈥檚 see how Escape characters and Template literals will solve the issue. let brokenString = 'I'm a broken string'; console.log(brokenString); // Output // unknown: Unexpected token (1:24) brokenString = 'I\'m a broken string'; console....

August 9, 2022聽路聽2 min聽路聽Infinitbility

how to handle apostrophe in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To handle apostrophe ( single quote, or double quote ) in react js, use the ( \ ) Escape characters or ( ` ) Template literals it will handle both types quotes single and double. Let鈥檚 see how Escape characters and Template literals will solve the issue. let brokenString = 'I'm a broken string'; console.log(brokenString); // Output // unknown: Unexpected token (1:24) brokenString = 'I\'m a broken string'; console....

August 9, 2022聽路聽2 min聽路聽Infinitbility

how to handle apostrophe in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To handle apostrophe ( single quote, or double quote ) in react native, use the ( \ ) Escape characters or ( ` ) Template literals it will handle both types quotes single and double. Let鈥檚 see how Escape characters and Template literals will solve the issue. let brokenString = 'I'm a broken string'; console.log(brokenString); // Output // unknown: Unexpected token (1:24) brokenString = 'I\'m a broken string'; console....

August 9, 2022聽路聽2 min聽路聽Infinitbility

how to handle apostrophe in typescript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To handle apostrophe ( single quote, or double quote ) in typescript, use the ( \ ) Escape characters or ( ` ) Template literals it will handle both types quotes single and double. Let鈥檚 see how Escape characters and Template literals will solve the issue. let brokenString: string = 'I'm a broken string'; console.log(brokenString); // Output // unknown: Unexpected token (1:24) brokenString: string = 'I\'m a broken string'; console....

August 9, 2022聽路聽2 min聽路聽Infinitbility

How to remove item from object in typescript?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To remove the item from an object in typescript, use the delete keyword it will remove the key-value pair from an object only you have to mention the delete keyword with the key. typescript object is one of the most used concepts and we will use it every day almost but sometimes we need to delete some key-value pair. Today, we will see how we can remove items from the typescript object using a key....

August 9, 2022聽路聽1 min聽路聽Infinitbility

how to check nan in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To check or handle NaN in react js, use the isNaN() method it will return if the value is not a number, if the value is a number it will return false. Let鈥檚 understand when the isNaN method returns false or when true. Number.isNaN(NaN); // true Number.isNaN(Number.NaN); // true Number.isNaN(0 / 0); // true // e.g. these would have been true with global isNaN() Number....

August 8, 2022聽路聽2 min聽路聽Infinitbility

how to check nan in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To check or handle NaN in react native, use the isNaN() method it will return if the value is not a number, if the value is a number it will return false. Let鈥檚 understand when the isNaN method returns false or when true. Number.isNaN(NaN); // true Number.isNaN(Number.NaN); // true Number.isNaN(0 / 0); // true // e.g. these would have been true with global isNaN() Number....

August 7, 2022聽路聽2 min聽路聽Infinitbility

how to check undefined in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To check or handle undefined in react native, use the if statement it will go inside in if statement if the value is not undefined. Basically, If the statement will handle all your false values like 0, false, "", undefined, etc. let value = undefined; if(value){ console.log("value have some data") } else { console.log("value is undefined") } Today, I鈥檓 going to show you How do I check or handle undefined in react native, as above mentioned, I鈥檓 going to use the if statement to check value is undefined or has some data....

August 6, 2022聽路聽2 min聽路聽Infinitbility

how to check undefined in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To check or handle undefined in react js, use the if statement it will go inside in if statement if the value is not undefined. Basically, If the statement will handle all your false values like 0, false, "", undefined, etc. let value = undefined; if(value){ console.log("value have some data") } else { console.log("value is undefined") } Today, I鈥檓 going to show you How do I check or handle undefined in react js, as above mentioned, I鈥檓 going to use the if statement to check value is undefined or has some data....

August 5, 2022聽路聽2 min聽路聽Infinitbility

how to remove duplicates from array in react js?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To remove duplicates from array in react js, use the new Set() method with it will create new array without dublicate elements. The Set object lets you store unique values of any type, whether primitive values or object references. To use new set in array you have to follow below syntax. [...new Set(arr)] Today, I鈥檓 going to show you How do I remove duplicates from array in react js, as above mentioned, I鈥檓 going to use the above-mentioned new Set() method to get only unique elements of array....

August 4, 2022聽路聽2 min聽路聽Infinitbility

how to remove duplicates from array in react native?

Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To remove duplicates from array in react native, use the new Set() method with it will create new array without dublicate elements. The Set object lets you store unique values of any type, whether primitive values or object references. To use new set in array you have to follow below syntax. [...new Set(arr)] Today, I鈥檓 going to show you How do I remove duplicates from array in react native, as above mentioned, I鈥檓 going to use the above-mentioned new Set() method to get only unique elements of array....

August 4, 2022聽路聽2 min聽路聽Infinitbility