<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ram Krishna Jha</title>
    <description>The latest articles on DEV Community by Ram Krishna Jha (@ramkrishnajha5).</description>
    <link>https://dev.to/ramkrishnajha5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1026395%2F7cf30f94-96f1-405e-b155-ab4290696d3b.jpeg</url>
      <title>DEV Community: Ram Krishna Jha</title>
      <link>https://dev.to/ramkrishnajha5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramkrishnajha5"/>
    <language>en</language>
    <item>
      <title>JavaScript Object Method and String Method</title>
      <dc:creator>Ram Krishna Jha</dc:creator>
      <pubDate>Sun, 12 May 2024 05:42:04 +0000</pubDate>
      <link>https://dev.to/ramkrishnajha5/javascript-object-method-and-string-method-3afc</link>
      <guid>https://dev.to/ramkrishnajha5/javascript-object-method-and-string-method-3afc</guid>
      <description>&lt;p&gt;&lt;strong&gt;Here we will discuss about different types of JavaScript Object Method and String Method with explanation and suitable example.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  First we will discuss about Object Methods.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How to create an Object
In JavaScript object is created in &lt;code&gt;key: "value"&lt;/code&gt;
pair each key have their own value it can string, number, array, function, other object and any data-type.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj = new Object();//empty object
//storing data in object
obj.name = "Dev";
obj.section = "B";
console.log(obj);//{ name: 'Dev', section: 'B' }
console.log(obj.name);//Dev

//Here name is key and Dev is value

//Another way to create a object
const language ={
    name: "JavaScript",
    description: "A Programming Language"
}
console.log(language);//{ name: 'JavaScript', description: 'A Programming Language' }
//We can change the value also
language.name = "Python";
console.log(language);//{ name: 'Python', description: 'A Programming Language' }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object.keys()
&lt;/h3&gt;

&lt;p&gt;When we pass any object in this method it returns the all keys of that object as an array .&lt;/p&gt;

&lt;p&gt;Example: In this example Returns myObject keys in array format in myObjectKeys&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myObject = {
    name: "John",
    age: 30,
    city: "New York",
    profession: "Software Engineer",
    hobbies: ["reading", "coding", "traveling"],
    isMarried: true
};
const myObjectKeys = Object.keys(myObject);

console.log(myObjectKeys);
//[ 'name', 'age', 'city', 'profession', 'hobbies', 'isMarried' ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object.values()
&lt;/h3&gt;

&lt;p&gt;When we pass any object in this method it returns the all values of that object as an array .&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myObject = {
    name: "John",
    age: 30,
    city: "New York",
    profession: "Software Engineer",
    hobbies: ["reading", "coding", "traveling"],
    isMarried: true
};
const myObjectValues = Object.values(myObject);

console.log(myObjectValues);
/*['John', 30, 'New York', 'Software Engineer',
    ['reading', 'coding', 'traveling'], true]*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Object.entries()
&lt;/h3&gt;

&lt;p&gt;It allows you to extract the enumerable property &lt;code&gt;[key, value]&lt;/code&gt; pairs from an object and return them as an array.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myObject = {
    name: "Alice",
    age: 25,
    city: "Goa",
    occupation: "Designer"
};

const myObjectPair = Object.entries(myObject);

console.log(myObjectPair);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
[[ 'name', 'Alice' ], [ 'age', 25 ], [ 'city', 'Goa' ], [ 'occupation', 'Designer' ]]&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.fromEntries()
&lt;/h3&gt;

&lt;p&gt;It transforms a list of key-value pairs into an object. It takes an iterable (like an array) whose elements are arrays or iterable objects with two elements (key and value) and returns a new object initialized with those key-value pairs.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arrayLitral = [
    [ 'name', 'Steve' ],
    [ 'age', 27 ],
    [ 'city', 'New York' ],
    [ 'occupation', 'Developer' ]
  ];

  const myObj = Object.fromEntries(arrayLitral);

  console.log(myObj);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{ name: 'Steve', age: 27, city: 'New York', occupation: 'Developer' }&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.assign()
&lt;/h3&gt;

&lt;p&gt;It used to copy the values of all enumerable own properties from one or more source objects to a target object. It returns the target object after merging the properties of the source objects into it.&lt;br&gt;
&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;Object.assign(target, ...sources objects)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const target = { a: 1, b: 2 };
const source1 = { b: 3, c: 4 };
const source2 = { c: 5, d: 6 };

const mergedObject = Object.assign(target, source1, source2);
// The properties of source1 and source2 are copied into target.
//If a property exists in both target and a source object, the value from the source object overwrites the value in target.
//The mergedObject is the modified target object with properties from all source objects.

console.log(mergedObject);

const randomObject = {
    key1: "value1",
    key2: 42,
    key3: ["a", "b", "c"],
    key4: { nestedKey: "nestedValue" }
};

const cloneRandomObject = Object.assign({}, randomObject);
//it copies the randomObject into a empty object and returns the value

//if we change or add something in original obj it does not changes in cloned object

randomObject.key1 = "randomValue1";
randomObject.key5 = true;

console.log(cloneRandomObject);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{ a: 1, b: 3, c: 5, d: 6 }&lt;br&gt;
{key1: 'value1', key2: 42, key3: [ 'a', 'b', 'c' ], key4:{nestedKey: 'nestedValue' }}&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.freeze() &amp;amp; Object.isFrozen()
&lt;/h3&gt;

&lt;p&gt;frozen prevents to add, remove the new properties in object it's also prevent to modify the current objects elements.&lt;br&gt;
where as isFrozen check the object is freeze or not if that object is frozen it returns true else it will returns false. &lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {name: "Alex", age: 25};
Object.freeze(myObj);// freeze the myObj

myObj.email = "alex@gmail.com";//adding the value but the object is freeze so value will not added
myObj.name = "Steve";//value not modified it's shows an error in strict mode

console.log(myObj);

console.log(Object.isFrozen(myObj));// it shows true because object is frozen

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{ name: 'Alex', age: 25 }&lt;br&gt;
true&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.seal() &amp;amp; Object.isSealed()
&lt;/h3&gt;

&lt;p&gt;This method is used to seal an object. Sealing an object means that it's existing properties cannot be deleted, but their values can be changed it also prevent to add new properties.&lt;br&gt;
isSealed checks the object is sealed or not if the object is sealed it returns the true boolean value if the object is not sealed it returns the false.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {name: "Alex", age: 25};
Object.seal(myObj);// freeze the myObj

myObj.email = "alex@gmail.com";//adding the value but the object is sealed so value will not added
myObj.name = "Steve";//value modified

console.log(myObj);

console.log(Object.isSealed(myObj));// it shows true because object is sealed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{ name: 'Steve', age: 25 }&lt;br&gt;
true&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.isExtensible() &amp;amp; Object.preventExtensions()
&lt;/h3&gt;

&lt;p&gt;This method prevent to add new value in object or isExtensible checked the object is Extensible or not it returns boolean value.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {
    key1: "value1",
    key2: "value2",
    key3: "value3"
}
console.log(Object.isExtensible(myObj));//true
Object.preventExtensions(myObj);

myObj.key4 = "value4";//but property will not added

console.log(Object.isExtensible(myObj));//false
console.log(myObj);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
true&lt;br&gt;
false&lt;br&gt;
{ key1: 'value1', key2: 'value2', key3: 'value3' }&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.create()
&lt;/h3&gt;

&lt;p&gt;This method creates a new object with the specified prototype of the new object. The properties of prototype object can be access in new object.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const protoMethods = {
    square: function(){
       console.log(`Square of ${this.key1} is ${(this.key1)**2}`);
       console.log(`Square of ${this.key2} is ${(this.key2)**2}`);
       console.log(`Square of ${this.key3} is ${(this.key3)**2}`);
    }
}

const numObj = Object.create(protoMethods);//set prototype protoMethods
numObj.key1 = 4;
numObj.key2 = 6;
numObj.key3 = 9;
console.log(numObj.square());//property of prototype (square) is used in numObj
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
Square of 4 is 16&lt;br&gt;
Square of 6 is 36&lt;br&gt;
Square of 9 is 81&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.hasOwn() &amp;amp; .hasOwnProperty()
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt; &lt;code&gt;Object.hasOwn(object name, "object key");&lt;/code&gt;&lt;br&gt;
           &lt;code&gt;objectName.hasOwnproperty("object key");&lt;/code&gt;&lt;br&gt;
Both methods returns true if the key present in the object else it will return false.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myObject = {
    name: "Alice",
    age: 25,
    city: "Goa",
    occupation: "Designer"
};

console.log(Object.hasOwn(myObject, "name"));//true
console.log(Object.hasOwn(myObject, "address"));//false

console.log(myObject.hasOwnProperty("city"));//true
console.log(myObject.hasOwnProperty("country"));//false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
true&lt;br&gt;
false&lt;br&gt;
true&lt;br&gt;
false&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.getOwnPropertyNames()
&lt;/h3&gt;

&lt;p&gt;It returns an array containing the names of all properties that belong to the object itself, not its prototype chain.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const protoObj = {
    greet() {
      console.log("Hello!");
    }
  };

  // Create a new object with protoObj as its prototype and define properties directly
  const newObj = Object.create(protoObj, {
    name: {value: "John"},
    age: {value: 35}
  });

newObj.greet();//great is the prototype value
const propertyName = Object.getOwnPropertyNames(newObj);
console.log(propertyName);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
Hello!&lt;br&gt;
[ 'name', 'age' ]&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.getOwnPropertyDescriptor()
&lt;/h3&gt;

&lt;p&gt;This static method use to get own property descriptor on a given object.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj = {
  name: "John",
  age: 30
};

const descriptor = Object.getOwnPropertyDescriptor(obj, 'name');
console.log(descriptor);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{&lt;br&gt;
  value: "John",&lt;br&gt;
  writable: true,&lt;br&gt;
  enumerable: true,&lt;br&gt;
  configurable: true&lt;br&gt;
}&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; &lt;br&gt;
value: The value of the property.&lt;br&gt;
writable: Whether the value of the property can be changed.&lt;br&gt;
enumerable: Whether the property will be returned in certain object iteration methods.&lt;br&gt;
configurable: Whether the property descriptor can be changed and the property can be deleted.&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.getOwnPropertyDescriptors()
&lt;/h3&gt;

&lt;p&gt;this method returns the object of all object properties descriptors.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {name: "Brohit", class: 11, fav: "cricekt", occupatons: "designer"};

const discriptValue = Object.getOwnPropertyDescriptors(myObj);
console.log(discriptValue);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
{&lt;br&gt;
  name: {&lt;br&gt;
    value: 'Brohit',&lt;br&gt;
    writable: true,&lt;br&gt;
    enumerable: true,&lt;br&gt;
    configurable: true&lt;br&gt;
  },&lt;br&gt;
  class: { value: 11, writable: true, enumerable: true, configurable: true },&lt;br&gt;
  fav: {&lt;br&gt;
    value: 'cricekt',&lt;br&gt;
    writable: true,&lt;br&gt;
    enumerable: true,&lt;br&gt;
    configurable: true&lt;br&gt;
  },&lt;br&gt;
  occupatons: {&lt;br&gt;
    value: 'designer',&lt;br&gt;
    writable: true,&lt;br&gt;
    enumerable: true,&lt;br&gt;
    configurable: true&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;
&lt;h6&gt;
  
  
  value, writable, enumerable, configurable described in previous example
&lt;/h6&gt;
&lt;h3&gt;
  
  
  Object.defineProperty()
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;Object.defineProperty(obj, "prop", {descriptor})&lt;/code&gt;&lt;br&gt;
In this method we define the own property for the object element.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {}; 
Object.defineProperty(myObj, 'prop1', { 
    value: 65, 
    writable: false
}); 
myObj.prop1 = 7; //writable value is false so we cannot change the value to 7
console.log(myObj.prop1); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
65&lt;/p&gt;
&lt;h3&gt;
  
  
  Object.defineProperties()
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;Object.defineProperties(object, {key1:{discriptor}, key2:{discriptor}, keyn:{discriptor}})&lt;/code&gt;&lt;br&gt;
In this method we define the own properties for the object's one or more then one elements.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {}; 

Object.defineProperties(myObj,{
    key1:{
        value:"value1",
        writable: true,
        enumerable: true,
        configurable: true
    },
    key2:{
        value:"value2",
        writable: true,
        enumerable: false,
        configurable: true
    },
    key3:{
        value:"value3",
        writable: false,
        enumerable: true,
        configurable: true
    }
});
myObj.key1 = "Changed Value1"//value changed
myObj.key3 = "Changed Value3";//discriptor writable is false so cannot changed the value

//applying loop in myObj key2 will not display in loop because enumerable is false
for(let key in myObj){
    console.log(myObj[key]);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT:&lt;br&gt;
Changed Value1&lt;br&gt;
value3&lt;/p&gt;
&lt;h2&gt;
  
  
  Importent String Methods
&lt;/h2&gt;
&lt;h3&gt;
  
  
  String method -
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;it includes charAt(), concat(), endsWith(), startswith(), includes(), indexOf(), padEnd(), padStart(), repeat(), replace(), replaceAll(), search(), slice(), split(), subString(), toLowerCase(), toUpperCase(), trim(), trimEnd(), trimStart()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We will understand these methods with the help of certain example&lt;/p&gt;
&lt;h4&gt;
  
  
  charAt(), concat(), endsWith() and startswith()
&lt;/h4&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myString = "Hello World";
const spaceString = " ";
const anotherString = "Welcome";

//charAt returns the char at that index
console.log(myString.charAt(4));//o

//concat merge the strings
console.log(anotherString.concat(spaceString,myString));//"Welcome Hello World"

//endsWith
console.log(myString.endsWith("World"));//true
console.log(myString.endsWith("Hello"));//false

//startsWith
console.log(myString.startsWith("Hello"));//true
console.log(myString.startsWith("Random"));//false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  includes(), indexOf(), padEnd() and padStart()
&lt;/h4&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myString = "Hello World";
const spaceString = " ";
const anotherString = "Welcome";

//includes
console.log(myString.includes("o"));//true
console.log(myString.includes("z"));//false

//indexOf
console.log(anotherString.indexOf("c"));//3
console.log(myString.indexOf("o"));//4

//padEnd
console.log(myString.padEnd(15, "p"));//after Hello World it added p till 15th index. output:Hello Worldpppp
console.log(anotherString.padEnd(12, "Yes"));//WelcomeYesYe

//padStarts
console.log(myString.padStart(17, "Alex"));//AlexAlHello World
console.log(spaceString.padStart(5, "M"));//MMMM 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  repeat(), replace(), replaceAll() and search()
&lt;/h4&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const anotherString = "Welcome";

//repeat
console.log(anotherString.repeat(3));//WelcomeWelcomeWelcome

//replace
console.log("Hello World World".replace("World", "Earth"));//Hello Earth World

//replaceAll
console.log("Hello World World".replaceAll("World", "Earth"))//Hello Earth Earth

//search(it returns the first index where the value found in string)
console.log("Hello World Welcome to the hell".search("Welcome"));//12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  slice(), split() and subString()
&lt;/h4&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//slice(start Index, value - 1 index )
console.log("Hello World!".slice(6)); // World! (cut the element from index 6 to last index)
console.log("Hello World!".slice(6, 11)); // World (from 6 to 11 - 1 means 10th index)


//split  it returns the array of split element
console.log("hello,world,hello,world".split(","));
// output - [ 'hello', 'world', 'hello', 'world' ]


//substring
console.log("hello".substring(2)); // llo
console.log("hello".substring(1, 3)); // el
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  toLowerCase(), toUpperCase(), trim(), trimEnd() and trimStart()
&lt;/h4&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myString = "Hello World";

//toUpperCase
console.log(myString.toUpperCase());//"HELLO WORLD"

//toLowerCase
console.log(myString.toLowerCase());//"hello world"

//trim it removes spaces from the string
const spaceString = "    Hello    ";
console.log(spaceString.trim());//"Hello"

//trimEnd
console.log(spaceString.trimEnd());//"    Hello"

//trimStart
console.log(spaceString.trimStart());//"Hello    "
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, we understand the object methods and string methods with the help of examples if you have any doubt or suggestion related to this topic please write down in the comment.&lt;br&gt;
&lt;strong&gt;Happy Learning😊&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Important Array Method in JavaScript</title>
      <dc:creator>Ram Krishna Jha</dc:creator>
      <pubDate>Wed, 01 May 2024 15:26:12 +0000</pubDate>
      <link>https://dev.to/ramkrishnajha5/important-array-method-in-javascript-4n7g</link>
      <guid>https://dev.to/ramkrishnajha5/important-array-method-in-javascript-4n7g</guid>
      <description>&lt;p&gt;&lt;strong&gt;In this article, we will try to understand various important Array methods (like forEach(), reduce() and so on) with the help of certain examples.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, we create an array in JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let array = [value1, value2, value3, value4];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this above example we created an array which name is array and we can assign the value in value1,value2 and so on the index of array starts with 0 and end on &lt;code&gt;last array element - 1&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  forEach() Method
&lt;/h2&gt;

&lt;p&gt;The forEach() method is used to execute a provided function once for each element in an array. It's a convenient way to loop through array elements without the need for traditional for or while loops.&lt;/p&gt;

&lt;p&gt;Example: In this example, we will print each element of the array using the forEach() method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const users = ["Hey", 1,2,4.5,{key1: "value1", key2: "value2"}];

users.forEach((user) =&amp;gt; {
    console.log(user);
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
Hey&lt;br&gt;
1&lt;br&gt;
2&lt;br&gt;
4.5&lt;br&gt;
{ key1: 'value1', key2: 'value2' }&lt;/p&gt;
&lt;h2&gt;
  
  
  map() Method
&lt;/h2&gt;

&lt;p&gt;This method changes the array elements according to user specific condition and returns the new array.&lt;/p&gt;

&lt;p&gt;Example: In this example we get a new array which is square of every num element of previous array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const userNum = [5,3,4,6,3,1,6];

const squareUserNum = userNum.map((num) =&amp;gt;{
    return num*num;
})
console.log(squareUserNum);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
[25, 9, 16, 36, 9, 1, 36]&lt;/p&gt;
&lt;h2&gt;
  
  
  filter() Method
&lt;/h2&gt;

&lt;p&gt;In this method if the return condition gets true the value of the array returns as a new array.&lt;/p&gt;

&lt;p&gt;Example: In this example &lt;code&gt;filter()&lt;/code&gt;Method returns the even number of the array as a new array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let number = [2,5,8,3,11,23,34,12,68,];
let evenNumber = number.filter((num) =&amp;gt;{
    return num % 2 === 0;
});
console.log(evenNumber);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: &lt;code&gt;[2,8,34,12,68]&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  reduce() Method
&lt;/h2&gt;

&lt;p&gt;The reduce method reduces arrays to a single value and returns a single value. The function takes four arguments: accumlator, current value, current index and array itself. &lt;/p&gt;

&lt;p&gt;Example: Here we reduce the array value and returns.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,3,6,7,4];
const sumOfNumber = number.reduce((accumlator, currentValue) =&amp;gt;{
    return accumlator+currentValue;
});
console.log(sumOfNumber);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: &lt;code&gt;27&lt;/code&gt;&lt;br&gt;
reduce Method tracing:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kkbf5sceswwetzdyeut.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kkbf5sceswwetzdyeut.jpg" alt=" " width="800" height="501"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Note: if we set accumlator value 0 the currentValue starts with array 0th index.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  sort() Method
&lt;/h2&gt;

&lt;p&gt;sort method changes the current array into ascending or descending order. (In words, first short by capital latter then small latter.)&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const names1 = ["arun", "monu", "Ajit", "Sonu", "Rohit", "Ram"];

//For Ascending Order
names1.sort();//names1 sorted in ascending order
console.log(names1);// [ 'Ajit', 'Ram', 'Rohit', 'Sonu', 'arun', 'monu' ]

//For Descending Order
names1.sort((a,b)=&amp;gt;{
   return a &amp;gt; b ? -1 : 1;
});
console.log(names1);// [ 'monu', 'arun', 'Sonu', 'Rohit', 'Ram', 'Ajit' ]

const num = [2,5,1,34,22,21,95,52];

//For Ascending Order
num.sort((a,b)=&amp;gt;{
    return a-b;
});
console.log(num);// [1,  2,  5, 21, 22, 34, 52, 95]

//For Descending Order
num.sort((a,b) =&amp;gt;{
    return b-a;
});
console.log(num);// [95, 52, 34, 22, 21,  5,  2,  1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  find() Method
&lt;/h2&gt;

&lt;p&gt;it returns the first index value where returns condition gets true.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,1,34,22,21,95,52];

const checkedNumber = number.find((num) =&amp;gt;{
    return num&amp;gt;30;//here checked array number greater then 30
})
console.log(checkedNumber);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: &lt;code&gt;34&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  every() Method
&lt;/h2&gt;

&lt;p&gt;If every array element passes through the condition return true the method itself return the true if any of the condition gets false it returns false.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,1,34,22,21,95,52];


const checkNumber = number.every((num) =&amp;gt;{
    return num&amp;lt;100;// it true for every array element so it returns true
})
console.log(checkNumber);// true

const isEven = number.every((num) =&amp;gt;{
    return num % 2 === 0;// it's not true for every array element
})
console.log(isEven);// false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: &lt;br&gt;
&lt;code&gt;true&lt;/code&gt;&lt;br&gt;
&lt;code&gt;false&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  some() Method
&lt;/h2&gt;

&lt;p&gt;if any one or more array element passes through the condition returns true the method will return true else it will return false.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,1,34,22,21,95,52];


const checkNumber = number.some((num) =&amp;gt;{
    return num&amp;lt;50;// it true for some(95and 52) array element so it returns true
})
console.log(checkNumber);// true

const recheckNumber = number.some((num) =&amp;gt;{
    return num&amp;gt;100;// it's not true for every array element
})
console.log(recheckNumber);// false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: &lt;br&gt;
&lt;code&gt;true&lt;/code&gt;&lt;br&gt;
&lt;code&gt;false&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  fill() Method
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;structure&lt;/strong&gt; &lt;code&gt;array.fill(value, start index, end index)&lt;/code&gt;&lt;br&gt;
it change the current array and assign the value from start index to before end index or it returns the array when we assign a new array.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,1,34,22,21,95,52];


number.fill(0, 3, 5);// assigning value 0 to 3rd index to 4th index
console.log(number);// modified array

//assign new array
const numFive = new Array(5).fill(7);//assigning 5 times 7
console.log(numFive);//[7,7,7,7,7]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;[2,  5,  1,  0, 0, 21, 95, 52]&lt;/code&gt;&lt;br&gt;
&lt;code&gt;[ 7, 7, 7, 7, 7 ]&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  splice() Method
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt; &lt;code&gt;array.splice(start index, delete, insert)&lt;/code&gt;&lt;br&gt;
it modifies the current array it can insert the new element in array and it can delete elements from the as well. When we delete elements it returns the deleted elements array. &lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [2,5,1,34,22,21,95,52];


const deletedNumber = number.splice(1,3,67,20);
//from 1st index 3 element deleted and 67,20 inserted

console.log(number);//[2,67,20,22,21,95,52];
console.log(deletedNumber);//[5,1,34];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;[2,67,20,22,21,95,52]&lt;/code&gt;&lt;br&gt;
&lt;code&gt;[5,1,34]&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  push(), pop(), shift(), unshift() Methods
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;push() method add variable from last of the array&lt;/li&gt;
&lt;li&gt;pop() method removes variable from last of the array&lt;/li&gt;
&lt;li&gt;shift() method removes variable from start of the array element&lt;/li&gt;
&lt;li&gt;unshift() method add variable from start of the array element&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let fruits = ["apple", "orange"];

fruits.push("mango", "banana");//adding mango and banana in last of the array
console.log(fruits);// ["apple", "orange", "mango", "banana"]

fruits.pop();//removing from last of the array
console.log(fruits);//["apple", "orange", "mango",]

fruits.unshift("guava", "grapes");//adding guava and grapes in starting of array
console.log(fruits);//["guava", "grapes", "apple", "orange", "mango",]

fruits.shift();//removing from start of the array
console.log(fruits);//["grapes", "apple", "orange", "mango",]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;[ 'apple', 'orange', 'mango', 'banana' ]&lt;br&gt;
[ 'apple', 'orange', 'mango' ]&lt;br&gt;
[ 'guava', 'grapes', 'apple', 'orange', 'mango' ]&lt;br&gt;
[ 'grapes', 'apple', 'orange', 'mango' ]&lt;/code&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>CSS Grid vs Flexbox</title>
      <dc:creator>Ram Krishna Jha</dc:creator>
      <pubDate>Mon, 22 Apr 2024 05:53:08 +0000</pubDate>
      <link>https://dev.to/ramkrishnajha5/css-grid-vs-flexbox-324e</link>
      <guid>https://dev.to/ramkrishnajha5/css-grid-vs-flexbox-324e</guid>
      <description>&lt;p&gt;&lt;em&gt;Grid and flexbox. The basic difference between CSS grid layout and CSS flexbox layout is that flexbox was designed for layout in one dimension either a row or a column, where as CSS Grid Layout, is a two-dimensional grid-based layout system with rows and columns.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Differences between CSS Grid and flexbox:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fki77nyjbh68ksz6cnh3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fki77nyjbh68ksz6cnh3z.png" alt=" " width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;style&amp;gt;
        .main{
            display: grid; 
            grid: auto auto / auto auto auto auto; 
            grid-gap: 10px; 
            background-color: green; 
            padding: 10px; 
        }
        .dev { 
            background-color: rgb(255, 255, 255); 
            text-align: center; 
            padding: 25px 0; 
            font-size: 30px; 
        } 
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h2 style="text-align: center;"&amp;gt;
        Welcome To Dev Community
    &amp;lt;/h2&amp;gt;
    &amp;lt;div class="main"&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Home&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Read&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Write&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;About Us&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Contact Us&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Privacy Policy&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we have to define a container element as a grid with display: grid, set the column and row sizes with grid-template-columns and grid-template-rows, and then place its child elements into the grid with grid-column and grid-row.&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmakcbeoxoa6ojy6k1jhj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmakcbeoxoa6ojy6k1jhj.jpg" alt=" " width="800" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use Grid&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Building a Responsive Design:&lt;/em&gt;&lt;/strong&gt; Often times, user interfaces are developed to be adaptable to whatever screen they're being displayed on. In such cases, the grid layout is your best bet because it gives room to flexibility and resizing of the element.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Control of whitespace:&lt;/em&gt;&lt;/strong&gt; Unlike the flex display that leaves some white space at the extreme, the CSS grid controls white space by distributing elements equally along the row and also based on the allocated column space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Consistency in Design Layout:&lt;/em&gt;&lt;/strong&gt; The CSS grid offers a consistent pattern in the structure of a web page. This arrangement of elements makes future editing of the page easier.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Flexbox
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;style&amp;gt;
        .main{
            display: flex; 
            grid: auto auto / auto auto auto auto; 
            grid-gap: 10px; 
            background-color: green; 
            padding: 10px; 
        }
        .dev { 
            background-color: rgb(255, 255, 255); 
            text-align: center; 
            padding: 25px 0; 
            font-size: 30px; 
        } 
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h2 style="text-align: center;"&amp;gt;
        Welcome To Dev Community
    &amp;lt;/h2&amp;gt;
    &amp;lt;div class="main"&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Home&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Read&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Write&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;About Us&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Contact Us&amp;lt;/div&amp;gt;
        &amp;lt;div class="dev"&amp;gt;Privacy Policy&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we have to define a container element as a grid with display: flex; It is helpful in allocating and aligning the space among items in a container (made of grids). It works with all kinds of display devices and screen sizes.&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftc8cn0qaxti5sd6bhltx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftc8cn0qaxti5sd6bhltx.jpg" alt=" " width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use Flex&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Building One-dimensional Layouts:&lt;/em&gt;&lt;/strong&gt; For web-pages or sections with a single layout, it is best to use flex as it helps in proper arrangement of the content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Alignment and Distribution of Content:&lt;/em&gt;&lt;/strong&gt; Thanks to &lt;code&gt;justify-content&lt;/code&gt;, &lt;code&gt;align-self&lt;/code&gt; and other properties, alignment and distribution of content is made easy using flex.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Displaying Columns in Equal heights:&lt;/em&gt;&lt;/strong&gt; Using the &lt;code&gt;align-items&lt;/code&gt; property and setting it to a value of &lt;code&gt;stretch&lt;/code&gt;, that is: &lt;code&gt;align-items:stretch&lt;/code&gt;, CSS flex ensures that columns within a flexbox are of equal heights.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>Uninstall System apps(Bloatware) from Android</title>
      <dc:creator>Ram Krishna Jha</dc:creator>
      <pubDate>Wed, 15 Feb 2023 07:56:53 +0000</pubDate>
      <link>https://dev.to/ramkrishnajha5/uninstall-system-appsbloatware-from-android-3261</link>
      <guid>https://dev.to/ramkrishnajha5/uninstall-system-appsbloatware-from-android-3261</guid>
      <description>&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;ndroid phones from different brands most of the come with some bloatware or unwanted apps that cannot be removed. Don't worry we can uninstall these apps by using the ADB commands. The commands included in the following steps should be universal. So, the method will work on any Android device. You can follow the steps for Samsung Galaxy, Realme, Redmi, Vivo, Oppo, Xiaomi and others.&lt;/p&gt;

&lt;h5&gt;
  
  
  First You Need to Enable USB Debugging, For enabling USB Debugging and more Follow the steps mentioned below.
&lt;/h5&gt;

&lt;h4&gt;
  
  
  1. Enable Developer options on your Android Phone
&lt;/h4&gt;

&lt;p&gt;Go to Settings &amp;gt; About Phone on your phone. Then tap 7 times on "Build Number" to enable Developer Options.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Enable USB Debugging
&lt;/h4&gt;

&lt;p&gt;Go to Settings &amp;gt; System Setting &amp;gt; Developer Options. Then enable the switch for "USB Debugging".&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Download application Package Name Viewer 2.0
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.csdroid.pkg" rel="noopener noreferrer"&gt;Click Here to Download&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Now Move on to Your PC
&lt;/h5&gt;

&lt;h4&gt;
  
  
  1. Download Minimal ADB and Fastboot setup and Install in Your PC
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://androidfilehost.com/?fid=746010030569952951" rel="noopener noreferrer"&gt;Click Here to Download&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Run ADB
&lt;/h4&gt;

&lt;p&gt;Run ADB that will open in Your Command Prompt&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eal5mb7zfvx6c6pbpsp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eal5mb7zfvx6c6pbpsp.png" alt=" " width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Connect to PC
&lt;/h4&gt;

&lt;p&gt;Connect to Your PC and Allow for Transfer files/Android Auto and a popup appears on your phone screen Allow USB Debugging? , Click on Allow.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdn77h4rno6l463agz2q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdn77h4rno6l463agz2q.jpg" alt=" " width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.Type Commands in Command Prompt
&lt;/h4&gt;

&lt;p&gt;Type-   adb devices&lt;br&gt;
This shows your device Id&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flscywmxa9o8pbfs619of.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flscywmxa9o8pbfs619of.jpg" alt=" " width="800" height="151"&gt;&lt;/a&gt;&lt;br&gt;
 Type-   adb shell&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhifn8rmhh54zawwin4h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhifn8rmhh54zawwin4h.jpg" alt=" " width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Now Delete Apps by their Package Name
&lt;/h4&gt;

&lt;p&gt;Open Package Name Viewer 2.0 app in your phone and search which Unwanted app you want to Delete Click on that App Name That Shows&lt;br&gt;
Package Name,&lt;br&gt;
I want to  Delete Chrome so i viewed Chrome Package Name&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs75xbgoiw7098a45doc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgs75xbgoiw7098a45doc.jpg" alt=" " width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Now Type in Your Command Prompt for Any Bloatware Application
&lt;/h6&gt;

&lt;p&gt;pm uninstall -k --user 0 package name&lt;br&gt;
I'm Uninstalling Chrome so i write chrome package name which i viewed on phone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uwu2cundxbnplp1x37y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5uwu2cundxbnplp1x37y.jpg" alt=" " width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Success message appears on Command Prompt It means I Uninstalled Chrome Browser Successfully.
&lt;/h6&gt;

&lt;p&gt;If this blog is Helpful for you please like and for such more tech related tips and tricks Follow me.&lt;br&gt;
If you have any doubt or suggestions write a comment!&lt;br&gt;
Happy Learning😊&lt;/p&gt;

</description>
      <category>cloudflare</category>
      <category>serverless</category>
      <category>vite</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Front-End vs Back-End</title>
      <dc:creator>Ram Krishna Jha</dc:creator>
      <pubDate>Tue, 14 Feb 2023 04:35:11 +0000</pubDate>
      <link>https://dev.to/ramkrishnajha5/front-end-vs-back-end-2noo</link>
      <guid>https://dev.to/ramkrishnajha5/front-end-vs-back-end-2noo</guid>
      <description>&lt;p&gt;Front-End and Back-End are two of the most used terms in development world.&lt;br&gt;
So, let's talk about the differences between two terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Difference Between Front-End and Back-end
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Front-End developers focus on user-facing aspect of a web application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Back-end developers handle the application logic and data management.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32gvpzdrlzku5hb3asu4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F32gvpzdrlzku5hb3asu4.jpg" alt=" " width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Front-End Development?
&lt;/h3&gt;

&lt;p&gt;Front-End Development, also known as clint-side development is the development of the graphical user interface of a website there user can interact with them directly. Front end developers work in languages like HTML, CSS, JavaScript.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTML - HTML stand for Hyper Text Markup Language. it's the standard markup language for creating the structure of webpages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS - CSS stands for Cascading Style Sheets. it is a style sheet language to define the style of web pages in terms of font, colors, background and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript - JavaScript is a scripting language used to make web pages interactive and dynamic. it is an interpreted programming language with object-oriented capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Front end also works in its own set of frameworks and libraries. Here are just a few of the frameworks and libraries a front end developer would work with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AngularJS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ReactJS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;jQuery&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sass&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuk9stabr736bqunzgg7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuk9stabr736bqunzgg7.jpg" alt=" " width="739" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Back-End Development?
&lt;/h3&gt;

&lt;p&gt;Back-end development involves working with applications, databases, and servers to handle the application logic and data management functionality of a web application. These technologies interact with the front-end, often using APIs, to form a full technology stack. Back-end developers work in languages like PHP, Java, Ruby, Python, JavaScript, and Node.js.&lt;/p&gt;

&lt;p&gt;Back-End Framework and Database&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Express&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Django&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SQL Server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MongoDB&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
