<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Selahattindemir on Medium]]></title>
        <description><![CDATA[Stories by Selahattindemir on Medium]]></description>
        <link>https://medium.com/@selahattindemir?source=rss-a30f4fb5b801------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*S1fr7ForJTND-UwkrEnV0g.jpeg</url>
            <title>Stories by Selahattindemir on Medium</title>
            <link>https://medium.com/@selahattindemir?source=rss-a30f4fb5b801------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:53:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@selahattindemir/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaScript de bir büyü: Regex]]></title>
            <link>https://selahattindemir.medium.com/javascript-de-bir-b%C3%BCy%C3%BC-regex-563e61d2eadb?source=rss-a30f4fb5b801------2</link>
            <guid isPermaLink="false">https://medium.com/p/563e61d2eadb</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Selahattindemir]]></dc:creator>
            <pubDate>Wed, 17 May 2023 09:20:52 GMT</pubDate>
            <atom:updated>2023-05-17T09:20:52.148Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJ-mFhY_9csa5PEl7Ow29g.jpeg" /></figure><p>Metin işleme ve desen eşleştirme, günümüzde web geliştirmeden veri manipülasyonuna kadar birçok alanda büyük bir öneme sahiptir. Bu noktada JavaScript’in büyüleyici aracı olan Regular Expressions (Düzenli İfadeler) devreye giriyor. JavaScript’in Regex yetenekleri, metin içinde desenleri tanımlamak ve manipüle etmek için güçlü bir araç sunuyor. Bu yazıda, JavaScript’in Regex yeteneklerini keşfedecek ve metin işleme işlerinde nasıl bir büyüye dönüştüğünü göreceğiz. Regex’in temellerini öğrenecek, farklı desenleri nasıl oluşturabileceğinizi ve metin üzerinde nasıl uygulayabileceğinizi keşfedeceğiz. Hazır olun, JavaScript ile bir büyünün kapılarını açıyoruz!</p><h4>Regular Expressions (Düzenli İfadeler) Nedir?</h4><p>Regex, JavaScript’te metin desenlerini eşleştirmek ve manipüle etmek için kullanılan güçlü bir araçtır.</p><p>Düşünün ki bir sınıfta oturuyorsunuz ve sınıf arkadaşlarınızla sohbet ediyorsunuz. Farklı insanların farklı konuşma alışkanlıkları olduğunu fark ediyorsunuz. Bazıları belirli bir kelimeyi sık sık kullanırken, bazıları belirli bir kalıbı takip eden cümleler kurar.</p><p>İşte regex, tam olarak bu noktada devreye giriyor. O, metin içinde belirli desenleri tanımlamak için kullanılır. Bir desen oluşturduğunuzda, bu deseni bir metin içinde arayabilir ve eşleşen sonuçları bulabilirsiniz.</p><h4>Regex Desenleri</h4><p>Regex, bir metin desenini temsil eden karakterlerin bir kombinasyonunu kullanır. Örneğin, /javascript/ şeklinde bir regex, &quot;javascript&quot; kelimesini metin içinde arar. Regex desenleri arasında özel karakterler de bulunur. Bunlar, belirli metin özelliklerini temsil eder. Örneğin, /[0-9]/ regexi, metin içindeki herhangi bir sayıyı temsil eder.</p><p>Regex desenleri, daha karmaşık durumları ele almak için metin işleme için kullanışlı yönergeler sağlar. Örneğin, /[A-Za-z]+/ regexi, büyük veya küçük harfle başlayan ve ardından bir veya daha fazla harf içeren kelimeleri eşleştirir.</p><blockquote>Şimdi Regex Desenlerine açıklamaları ile birlikte bakalım..</blockquote><h4>1. Sayıları eşleştirmek:</h4><ul><li><strong>Desen:</strong> /[0-9]/</li><li><strong>Açıklama:</strong> Bu desen, metindeki herhangi bir sayıyı eşleştirir.</li></ul><h4>2. Birden çok rakamı eşleştirmek:</h4><ul><li><strong>Desen:</strong> /[0-9]+/</li><li><strong>Açıklama:</strong> Bu desen, metindeki bir veya daha fazla rakamı eşleştirir. Örneğin, “123” veya “45678” gibi rakamlar bu desenle eşleşir.</li></ul><h4>3. Harfleri eşleştirmek:</h4><ul><li><strong>Desen:</strong> /[a-zA-Z]/</li><li><strong>Açıklama:</strong> Bu desen, metindeki herhangi bir harfi (büyük veya küçük) eşleştirir.</li></ul><h4>4. Özel karakterleri eşleştirmek:</h4><ul><li><strong>Desen: </strong>/[@#$%&amp;]/</li><li><strong>Açıklama:</strong> Bu desen, metindeki belirli özel karakterlerden herhangi birini eşleştirir. Örneğin, “@”, “#”, “$” veya “&amp;” gibi karakterler bu desenle eşleşir.</li></ul><h4>5. E-posta adresini eşleştirmek:</h4><ul><li><strong>Desen:</strong> /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/</li><li><strong>Açıklama:</strong> Bu desen, geçerli bir e-posta adresini eşleştirir. E-posta adresinin belirli bir formatı takip etmesini sağlar.</li></ul><h4>6. Telefon numarasını eşleştirmek:</h4><ul><li><strong>Desen:</strong> /\d{3}-\d{3}-\d{4}/</li><li><strong>Açıklama:</strong> Bu desen, 3–3–4 şeklinde bir telefon numarasını eşleştirir. Örneğin, “123–456–7890” gibi bir telefon numarası bu desenle eşleşir.</li></ul><h4>7. Tarih formatını eşleştirmek:</h4><ul><li><strong>Desen:</strong> /\d{2}\/\d{2}\/\d{4}/</li><li><strong>Açıklama:</strong> Bu desen, dd/mm/yyyy formatındaki bir tarihi eşleştirir. Örneğin, “17/05/2023” gibi bir tarih bu desenle eşleşir.</li></ul><h4>8. Boşlukları temizlemek:</h4><ul><li><strong>Desen:</strong> /\s+/g</li><li><strong>Açıklama: </strong>Bu desen, metindeki tüm boşlukları eşleştirir. Bu deseni, metinden boşlukları kaldırmak için replace() yöntemiyle birlikte kullanabilirsiniz.</li></ul><h4><strong>9. Özel karakterleri kaçırmak:</strong></h4><ul><li><strong>Desen:</strong> /[.*+?^${}()|[\]\\]/g</li><li><strong>Açıklama:</strong> Bu desen, metindeki özel karakterleri eşleştirir. Bu karakterleri kaçırmak için \ karakteri kullanılabilir.</li></ul><h4>10. URL’yi eşleştirmek:</h4><ul><li><strong>Desen:</strong> /^(https?:\/\/)?([\w.-]+)\.([a-zA-Z]{2,})(\/\S*)?$/</li><li><strong>Açıklama:</strong> Bu desen, geçerli bir URL’yi eşleştirir. URL’nin belirli bir formata sahip olmasını kontrol eder.</li></ul><p>Regex desenleri, metin işleme, veri doğrulama veya desen eşleştirme gibi birçok senaryoda kullanılabilir ve ihtiyaçlarınıza uyacak şekilde özelleştirilebilir.</p><h4>Regex’in JavaScript’teki kullanımı</h4><p>Regex’in JavaScript’teki kullanımı oldukça kolaydır. Bir regex deseni oluşturduktan sonra, test() veya match() gibi metin yöntemleriyle metin üzerinde uygulayabilirsiniz. Bu yöntemler, eşleşen sonuçları bulmanıza ve hatta değiştirmenize olanak tanır.</p><p>Örneğin, /[0-9]+/ regexini kullanarak bir metindeki sayıları bulmak isterseniz, match() yöntemini kullanabilirsiniz. Bu yöntem, regex desenine uyan tüm sayıları bir dizi olarak döndürür.</p><pre>let metin = &quot;Bugün hava 23 derece ve yarın 19 derece olacak.&quot;;<br>let sayilar = metin.match(/[0-9]+/g);<br>console.log(sayilar); // Output: [&quot;23&quot;, &quot;19&quot;]</pre><p>Bu örnekte, match() yöntemi kullanılarak metindeki sayılar bulunur ve sayilar adlı bir diziye atanır. Dizi, eşleşen sayıları içerir.</p><p>Regex ayrıca metindeki desenleri değiştirmek için de kullanılabilir. Örneğin, bir metindeki tüm üç nokta işaretlerini ünlem işaretleriyle değiştirmek istediğinizde, replace() yöntemini kullanabilirsiniz:</p><pre>let metin = &quot;Bu bir deneme...&quot;;<br><br>let yeniMetin = metin.replace(/\.{3}/g, &quot;!!!&quot;);<br>console.log(yeniMetin); // Output: &quot;Bu bir deneme!!!&quot;</pre><p>Bu örnekte, replace() yöntemi kullanılarak metindeki tüm üç nokta işaretleri (\.{3} regex deseni) ünlem işaretleriyle değiştirilir.</p><blockquote>JavaScript kod örnekleriyle regex desenlerini açıklayan birkaç örnek..</blockquote><h4>1. Belirli bir kelimeyi metin içinde aramak:</h4><pre>let metin = &quot;Bu bir örnek metindir.&quot;;<br>let desen = /örnek/;<br>let sonuc = desen.test(metin);<br>console.log(sonuc); // Output: true</pre><p>Bu örnekte, /örnek/ regex deseni kullanılarak metin içinde &quot;örnek&quot; kelimesi aranır. test() yöntemi, desenin metin içinde eşleşip eşleşmediğini kontrol eder ve sonucu true veya false olarak döndürür.</p><h4>2. E-posta adresinin geçerliliğini kontrol etmek:</h4><pre>let email = &quot;ornek@example.com&quot;;<br>let desen = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;<br>let sonuc = desen.test(email);<br>console.log(sonuc); // Output: true</pre><p>Bu örnekte, /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/ regex deseni kullanılarak email değişkenindeki e-posta adresinin geçerliliği kontrol edilir. Desen, e-posta adresinin belirli bir formatı takip etmesini sağlar.</p><h4>3. E-posta adresindeki alan adını ayıklamak:</h4><pre>let email = &quot;ornek@example.com&quot;;<br>let desen = /@([\w.-]+)/;<br>let sonuc = email.match(desen);<br>let alanAdi = sonuc[1];<br>console.log(alanAdi); // Output: example.com</pre><p>Bu örnekte, /@([\w.-]+)/ regex deseni kullanılarak email değişkenindeki e-posta adresinin alan adı ayıklanır. match() yöntemiyle eşleşen bölüm elde edilir ve alanAdi değişkenine atanır.</p><h4>4. Şifre karmaşıklığını kontrol etmek:</h4><pre>let sifre = &quot;Abc123!&quot;;<br>let desen = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&amp;])[A-Za-z\d@$!%*?&amp;]{8,}$/;<br>let sonuc = desen.test(sifre);<br>console.log(sonuc); // Output: true</pre><p>Bu örnekte, /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&amp;])[A-Za-z\d@$!%*?&amp;]{8,}$/ regex deseni kullanılarak sifre değişkenindeki şifrenin karmaşıklığı kontrol edilir. Şifre, en az 8 karakter uzunluğunda olmalı, en az bir küçük harf, bir büyük harf, bir rakam ve bir özel karakter içermelidir.</p><h4>5. Metindeki URL’leri bulmak:</h4><pre>let metin = &quot;Bu bir metin örneğidir. Google&#39;ı ziyaret etmek için https://www.google.com adresini kullanabilirsiniz. Diğer bir popüler site ise https://www.example.com&#39;dur.&quot;;<br>let desen = /https?:\/\/[^\s]+/g;<br>let sonuclar = metin.match(desen);<br>console.log(sonuclar); // Output: [&quot;https://www.google.com&quot;, &quot;https://www.example.com&quot;]</pre><p>Bu örnekte, /https?:\/\/[^\s]+/g regex deseni kullanılarak metin içindeki tüm URL&#39;leri buluruz. Desen, &quot;http://&quot; veya &quot;https://&quot; ile başlayan ve bir boşluk karakterine kadar olan herhangi bir karakter dizisini eşleştirir.</p><h4>Not!!!</h4><p>Regex, metin desenlerini eşleştirme ve manipülasyon işlemleri için güçlü bir araçtır. Ancak, regex desenlerini oluştururken dikkatli olmanız önemlidir, çünkü hatalı bir desen beklenmedik sonuçlara neden olabilir.</p><p>Bu nedenle, regex’i kullanırken test etmek ve denemek önemlidir. Bir regex deseni oluşturduktan sonra, deseni hedef metinlerde test etmek için çeşitli online regex test araçlarından faydalanabilirsiniz.</p><h4>Kapanış..</h4><p>Regex, JavaScript geliştiricilerinin metin işleme süreçlerini büyülü bir şekilde kolaylaştıran bir araçtır. Karmaşık metin desenlerini eşleştirme, veri doğrulama ve manipülasyon gibi görevleri basit ve etkili bir şekilde gerçekleştirebilirsiniz. JavaScript ile Regex’i kullanmayı öğrenmek, kod yazma sürenizi kısaltacak ve veri işleme işlerinizi hızlandıracaktır.</p><p>Ancak, karmaşık regex desenlerini anlamak ve doğru şekilde kullanmak bazen zor olabilir. Daha fazla pratik yaparak ve farklı senaryolarda deneyerek Regex becerilerinizi geliştirebilirsiniz. Regex, JavaScript geliştirme yolculuğunuzda size büyük bir avantaj sağlayacak bir araçtır. İleri düzey Regex becerileri kazanarak JavaScript’in büyüsünü keşfedin!</p><p>Başarılar dilerim!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=563e61d2eadb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t be Ignorant of HTML!]]></title>
            <link>https://selahattindemir.medium.com/dont-be-ignorant-of-html-cd26bf7e827f?source=rss-a30f4fb5b801------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd26bf7e827f</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Selahattindemir]]></dc:creator>
            <pubDate>Sat, 06 May 2023 12:24:36 GMT</pubDate>
            <atom:updated>2023-05-06T12:24:36.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WoZnFAUBGOuESSvYnHvKnA.jpeg" /></figure><h3>What is HTML?</h3><p>First of all, HTML is not a programming language. HTML is a mark-up language, that is, it is used to change the appearance and / or function of all or only a part of a text with special marks called tags.</p><h3>What are these HTML Tags?</h3><p>The less than greater than sign is used to define tags in HTML. HTML tags can be classified in many different ways. A classification is as follows:</p><ol><li>Container tags consisting of an opening and a closing tag</li></ol><pre>&lt;p&gt;paragraph&lt;/p&gt;</pre><p>2. Stand-alone tags</p><pre>&lt;hr &gt;</pre><h3>Structure of HTML Documents</h3><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>&lt;!-- Head elements --&gt;<br>  Here, there are elements such as character set definitions, titles, <br>  JavaScript definitions, etc. that are not usually included in the document <br>  content.<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;!-- Body elements --&gt;<br>  Here, the document has the actual content, may contain text, audio, <br>  video etc.<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>The indispensable in HTML document are &lt;html&gt;, &lt;head&gt;, &lt;title&gt;, and &lt;meta&gt; tag in &lt;head&gt;, charset attribute in &lt;meta&gt; and&lt;body&gt; tags.</p><h3>Basic HTML Tags</h3><pre>&lt;!DOCTYPE html&gt;</pre><p>This line specifies that the document is using the HTML5 version.</p><pre>&lt;html&gt;&lt;/html&gt;</pre><p>This tag indicates the beginning of the document and contains all HTML code.</p><pre>&lt;head&gt;&lt;/head&gt;</pre><p>This tag contains the document’s title and other meta information. The browser does not display this section.</p><pre>&lt;meta&gt;</pre><p>Search engines on the web group by looking at the meta tag of the pages. There are many options. Overuse of meta tags can be seen as spammy by search engines and result in penalties.</p><pre>&lt;meta charset=&quot;utf-8&quot;&gt;</pre><p>This tag specifies the character encoding used on the page. UTF-8 is the recommended encoding for modern web pages.</p><pre>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;</pre><p>This tag is used to ensure that the page is displayed properly on different devices and screen sizes.</p><pre>&lt;meta name=&quot;description&quot; content=&quot;...&quot;&gt;</pre><p>This tag provides a brief description of the web page’s content, which is often displayed in search engine results.</p><pre>&lt;meta name=&quot;keywords&quot; content=&quot;...&quot;&gt;</pre><p>This tag specifies the keywords or phrases that are relevant to the page’s content.</p><pre>&lt;meta name=&quot;author&quot; content=&quot;...&quot;&gt;</pre><p>This tag specifies the author of the web page.</p><pre>&lt;meta name=&quot;robots&quot; content=&quot;...&quot;&gt;</pre><p>This tag specifies how search engines should index and display the web page.</p><pre>&lt;title&gt;&lt;/title&gt;</pre><p>This tag specifies the title of the web page, which appears in the browser’s title bar and search engine results.</p><h4>Example:</h4><pre>&lt;title&gt;Don&#39;t be Ignorant of HTML!&lt;/title&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SooLYDBxqeIQomi4qnoIeg.jpeg" /></figure><pre>&lt;body&gt;&lt;/body&gt;</pre><p>This element contains all the visible content of the web page, such as text, images, and other media.</p><h3>Text Formatting Tags</h3><h4>&lt;h1&gt;…&lt;h6&gt; : Title Tag</h4><p>These tags indicate headings and are used at different levels of hierarchy from 1 to 6.</p><h4>Note:</h4><p>The &lt;h1&gt; tag should be one on the page and should describe that page. Important for SEO</p><h4>Example:</h4><pre>&lt;h1&gt;Title1&lt;/h1&gt;<br>&lt;h2&gt;Title2&lt;/h2&gt;<br>&lt;h3&gt;Title3&lt;/h3&gt;<br>&lt;h4&gt;Title4&lt;/h4&gt;<br>&lt;h5&gt;Title5&lt;/h5&gt;<br>&lt;h6&gt;Title6&lt;/h6&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZ2YrzKS6y1yU2rXrXOcmQ.jpeg" /></figure><h4>&lt;p&gt; : Paragraph Tag</h4><p>This tag indicates paragraphs.</p><pre>&lt;p&gt;<br>    Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quia<br>    voluptatum. Quisquam, quia voluptatum. Quisquam, quia voluptatum.<br>    Quisquam, quia voluptatum. Quisquam, quia voluptatum. Quisquam, quia<br>    voluptatum.<br>&lt;/p&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47zAgj6yNidDebh2vka_Sw.jpeg" /></figure><h4>&lt;a&gt; link Tag</h4><p>This tag specifies a link and contains the target URL in the href attribute. With this command, you can open a new page with the link we create, direct the user to a different internet address, and enable the user to access a file that you have provided. The text we write between the &lt;a&gt; tag will have a link feature, unless otherwise specified, it will be shown underlined and blue by the browser.</p><pre>&lt;a href=&quot;&quot;&gt;Click me&lt;/a&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*_USFWcd_EcnSiUGzuP6t6w.jpeg" /></figure><pre>&lt;a href=&quot;mailto: bendeniz@mail.com&quot;&gt;Send Mail&lt;/a&gt;</pre><p>When the link here is clicked, the relevant mail program of the user will be opened and the e-mail address we have given in the send to (to) part of the mail will be written automatically.</p><pre>&lt;a href=&quot;tel: 1234567890&quot;&gt;Call me&lt;/a&gt;</pre><p>It allows us to make a call by direct forwarding to the tel number.</p><pre>&lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;</pre><p>We can prepare in-page (internal) links using this command. For example, a menu at the top of the page showing the page index.<br>When the user clicks on the desired title in this menu, the relevant topic is opened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQ6VLWlWXbt7I1MiaQVayQ.gif" /></figure><pre>&lt;a href=&quot;page2.html&quot;&gt;&lt;img src=&quot;img.jpg&quot;&gt;&lt;/a&gt;</pre><p>In order to add link feature to the images, we put the &lt;img&gt; tag, which we use to place the image, between the &lt;a&gt;tag.</p><blockquote>Target Attribute</blockquote><pre>&lt;a href=&quot;...&quot; target=&quot;...&quot; &gt;&lt;/a&gt;</pre><p>Used to specify the window in which the link will open.</p><ul><li>target=”_blank” : The link opens in a new window.</li><li>target=”_self” : The link opens in the same window.</li><li>target=”_top” : The link opens from the top in the same window.</li><li>target=”_parent” : If there is a home page that creates the currently open page, the dropdown link is changed.</li><li>target=”frame name” : Enables the framed connection to be opened in the frame called frame with the frame command.</li></ul><h4>&lt;img&gt; images Tag</h4><pre>&lt;img src=&quot;location and name of the picture or link of the picture&quot; &gt;</pre><p>There is no restriction in the selection of pictures, except that the picture we choose must be in gif or jpg format. What we need to do to add a picture is to show the browser where the picture it will put on the page.</p><pre>&lt;img src=&quot;images/cat.gif&quot; &gt;</pre><pre>&lt;img src=&quot;https://www.whiskas.com.tr/Content/img/home/article-kittenV2.png&quot; &gt;</pre><h4>&lt;li&gt; List Tag</h4><p>In HTML, there are three types of lists: ordered lists, unordered lists, and definition lists.</p><ol><li>Ordered Lists (&lt;ol&gt;): This type of list is used to display a numbered list of items. Each list item is preceded by a number that indicates its position in the list.</li></ol><pre>&lt;ol&gt;<br>  &lt;li&gt;First item&lt;/li&gt;<br>  &lt;li&gt;Second item&lt;/li&gt;<br>  &lt;li&gt;Third item&lt;/li&gt;<br>&lt;/ol&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*9Af1r2sBMRBuvsh0JTaVKQ.jpeg" /></figure><p>2. Unordered Lists (&lt;ul&gt;): This type of list is used to display a bulleted list of items. Each list item is preceded by a bullet point.</p><pre>&lt;ul&gt;<br>  &lt;li&gt;First item&lt;/li&gt;<br>  &lt;li&gt;Second item&lt;/li&gt;<br>  &lt;li&gt;Third item&lt;/li&gt;<br>&lt;/ul&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*zqOI_6usMm8hvczN2E3A8g.jpeg" /></figure><p>3. Definition Lists (&lt;dl&gt;): This type of list is used to define terms and their corresponding definitions. Each term is preceded by a &lt;dt&gt; (definition term) tag, and each definition is preceded by a &lt;dd&gt; (definition description) tag.</p><pre>&lt;dl&gt;<br>  &lt;dt&gt;Term 1&lt;/dt&gt;<br>  &lt;dd&gt;Definition 1&lt;/dd&gt;<br>  &lt;dt&gt;Term 2&lt;/dt&gt;<br>  &lt;dd&gt;Definition 2&lt;/dd&gt;<br>&lt;/dl&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*uabIKYpVsrDO5CFadaj6vg.jpeg" /></figure><h4>&lt;table&gt; table Tag</h4><p>HTML &lt;table&gt; tag is used to create a table in a web page. The &lt;table&gt; tag is used in combination with other tags like &lt;tr&gt; (table row), &lt;th&gt; (table header), and &lt;td&gt; (table data cell) to create the structure of the table.</p><pre>&lt;table&gt;<br>  &lt;thead&gt;<br>    &lt;tr&gt;<br>      &lt;th&gt;First Name&lt;/th&gt;<br>      &lt;th&gt;Last Name&lt;/th&gt;<br>      &lt;th&gt;Email&lt;/th&gt;<br>    &lt;/tr&gt;<br>  &lt;/thead&gt;<br>  &lt;tbody&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;John&lt;/td&gt;<br>      &lt;td&gt;Doe&lt;/td&gt;<br>      &lt;td&gt;john@example.com&lt;/td&gt;<br>    &lt;/tr&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;Jane&lt;/td&gt;<br>      &lt;td&gt;Doe&lt;/td&gt;<br>      &lt;td&gt;jane@example.com&lt;/td&gt;<br>    &lt;/tr&gt;<br>  &lt;/tbody&gt;<br>&lt;/table&gt;</pre><p>In this example, we’ve used the &lt;table&gt; tag to create a table with a header row and two data rows. The &lt;thead&gt; tag is used to define the table header, while the &lt;tbody&gt; tag is used to define the table body.</p><p>Within the header and body sections, we’ve used the &lt;tr&gt; tag to define each row, and the &lt;th&gt; tag to define the header cells. In the data rows, we&#39;ve used the &lt;td&gt; tag to define each cell containing data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*rYBBnypxYV1aOwVlCf-IJA.jpeg" /></figure><blockquote>Merge Cells</blockquote><p>The colspan and rowspan attributes are used in HTML table tags to specify how many columns or rows a table cell should span.</p><p>The colspan attribute specifies the number of columns that a cell should span horizontally, while the rowspan attribute specifies the number of rows that a cell should span vertically.</p><pre>&lt;table&gt;<br>  &lt;tr&gt;<br>    &lt;td rowspan=&quot;2&quot;&gt;1&lt;/td&gt;<br>    &lt;td&gt;2&lt;/td&gt;<br>    &lt;td&gt;3&lt;/td&gt;<br>  &lt;/tr&gt;<br>  &lt;tr&gt;<br>    &lt;td colspan=&quot;2&quot;&gt;4 and 5&lt;/td&gt;<br>  &lt;/tr&gt;<br>  &lt;tr&gt;<br>    &lt;td&gt;6&lt;/td&gt;<br>    &lt;td&gt;7&lt;/td&gt;<br>    &lt;td&gt;8&lt;/td&gt;<br>  &lt;/tr&gt;<br>&lt;/table&gt;</pre><p>In this example, the first cell in the first row uses the rowspan attribute to span two rows. The second row has a cell that spans two columns using the colspan attribute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*Nk_SHKQtfmyeAzQDDa7IhA.jpeg" /></figure><p>As you can see, the first cell in the first row spans two rows, and the second cell in the second row spans two columns. This can be useful for creating tables with complex layouts or to group cells together.</p><h4>&lt;form&gt; form Tag</h4><p>HTML &lt;form&gt; tags are used to collect user input. Forms can contain various types of form elements, such as input fields, checkboxes, radio buttons , drop-down lists, and buttons. The basic syntax for creating a form in HTML is as follows:</p><pre>&lt;form action=&quot;url&quot; method=&quot;POST/GET&quot;&gt;<br>  &lt;!-- form elements go here --&gt;<br>&lt;/form&gt;</pre><p>Here’s an explanation of the attributes used in the &lt;form&gt; tag:</p><ul><li>action: Specifies the URL of the script that will process the form data.</li><li>method: Specifies the HTTP method used to submit the form data. This can be either POST or GET.</li></ul><p>Here are some commonly used form elements in HTML:</p><ul><li>&lt;input&gt;: This is used to create various types of input fields, such as text boxes, checkboxes, radio buttons, and more. The type attribute specifies the type of input field that should be created.</li><li>&lt;select&gt;: This is used to create drop-down lists.</li><li>&lt;textarea&gt;: This is used to create multi-line text input fields.</li><li>&lt;button&gt;: This is used to create buttons.</li><li>&lt;label&gt; : Provides descriptive text for each input field.</li></ul><pre>&lt;form action=&quot;/submit-form&quot; method=&quot;POST&quot;&gt;<br>  &lt;label for=&quot;name&quot;&gt;Name:&lt;/label&gt;<br>  &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;&gt;&lt;br&gt;<br><br>  &lt;label for=&quot;email&quot;&gt;Email:&lt;/label&gt;<br>  &lt;input type=&quot;email&quot; id=&quot;email&quot; name=&quot;email&quot;&gt;&lt;br&gt;<br><br>  &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;<br>  &lt;input type=&quot;password&quot; id=&quot;password&quot; name=&quot;password&quot;&gt;&lt;br&gt;<br><br>  &lt;label for=&quot;gender&quot;&gt;Gender:&lt;/label&gt;<br>  &lt;input type=&quot;radio&quot; id=&quot;male&quot; name=&quot;gender&quot; value=&quot;male&quot;&gt;<br>  &lt;label for=&quot;male&quot;&gt;Male&lt;/label&gt;<br>  &lt;input type=&quot;radio&quot; id=&quot;female&quot; name=&quot;gender&quot; value=&quot;female&quot;&gt;<br>  &lt;label for=&quot;female&quot;&gt;Female&lt;/label&gt;&lt;br&gt;<br><br>  &lt;label for=&quot;interests&quot;&gt;Interests:&lt;/label&gt;<br>  &lt;select id=&quot;interests&quot; name=&quot;interests&quot;&gt;<br>    &lt;option value=&quot;reading&quot;&gt;Reading&lt;/option&gt;<br>    &lt;option value=&quot;music&quot;&gt;Music&lt;/option&gt;<br>    &lt;option value=&quot;sports&quot;&gt;Sports&lt;/option&gt;<br>  &lt;/select&gt;&lt;br&gt;<br><br>  &lt;label for=&quot;comments&quot;&gt;Comments:&lt;/label&gt;<br>  &lt;textarea id=&quot;comments&quot; name=&quot;comments&quot;&gt;&lt;/textarea&gt;&lt;br&gt;<br><br>  &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;<br>&lt;/form&gt;</pre><p>In this example, we’ve created a form with several form elements, including text input fields, radio buttons, a drop-down list, a textarea, and a submit button. When the form is submitted, it will be sent to the URL specified in the action attribute using the HTTP method specified in the method attribute (in this case, POST).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P72kq8kVj6KAlpzniukK8Q.gif" /></figure><h4>&lt;iframe&gt; iframe Tag</h4><p>HTML &lt;iframe&gt; tag is used to embed another HTML document into the current HTML document. This is commonly used to display content from another website or to embed a video or audio player.</p><pre>&lt;iframe src=&quot;url_of_document_to_embed&quot;&gt;&lt;/iframe&gt;</pre><p>The src attribute specifies the URL of the document to embed. You can also use the width and height attributes to specify the dimensions of the embedded content, and the frameborder attribute to add or remove the border around the embedded content.</p><pre>&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/dQw4w9WgXcQ&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9sHMkCEKFJ9bZx5687BCQ.jpeg" /></figure><h3>Closing Letter</h3><p>Thank you for taking the time to read my article. I hope you found it informative and helpful. Whether you’re a beginner or an experienced developer, HTML is a crucial language to learn and understand in web development. With its simple syntax and powerful capabilities, HTML is the foundation for building engaging and dynamic web pages.</p><p>Remember, this is just the beginning of your journey with HTML. There’s always more to learn and explore, and I encourage you to continue exploring and experimenting with this language to see what you can create.</p><p>If you have any questions or feedback regarding this, you can reach me at any time.</p><p>Thanks..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd26bf7e827f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to React Native Array Methods]]></title>
            <link>https://javascript.plainenglish.io/react-native-array-methods-d469b7f10447?source=rss-a30f4fb5b801------2</link>
            <guid isPermaLink="false">https://medium.com/p/d469b7f10447</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Selahattindemir]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 19:46:31 GMT</pubDate>
            <atom:updated>2021-12-21T10:19:31.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPn1a5RpP89RDuxU3UWiMg.png" /></figure><p>Let’s consider what an array method is. Simply put, React array methods are the methods that are available as array prototypes with the new version of JavaScript, by which we can navigate the array elements one by one with the help of a callback function and perform certain checks</p><p>First, keep in mind that this article most likely applies to other programming languages and frameworks you use, as these are concepts that exist in many other languages and frameworks.</p><p>As an example, let’s say we have data like this.</p><pre>const products = [<br>  { id: 1, name: &quot;Pencil&quot;, price: 5 },<br>  { id: 2, name: &quot;Notebook&quot;, price: 10 },<br>  { id: 3, name: &quot;Eraser&quot;, price: 2 },<br>  { id: 4, name: &quot;Sharpener&quot;, price: 7 },<br>];</pre><h3>.find()</h3><p>Used to find an element in an array. As soon as the element is found, the search stops and returns the found element. If there is another element that meets the same conditions, the first element found is returned.</p><pre>products.find((product) =&gt; product.price &gt; 5); // {id: 2, name: &quot;Notebook&quot;, price: 10}</pre><h3>.some()</h3><p>Returns true/false whether at least one element in the array satisfies the given condition.</p><pre>products.some((product) =&gt; product.price &lt; 2); // false, There isn&#39;t a single one in the array that costs less than 2<br>products.some((product) =&gt; product.price &gt; 9); // true, There is at least one price greater than 9 in the array</pre><h3>.every()</h3><p>Returns true/false whether all elements in the array meet the entered condition.</p><pre>products.every((product) =&gt; product.price &gt; 1); // true, All product prices are greater than 1<br>products.every((product) =&gt; product.price &lt; 10); // false, All item prices NOT less than 10</pre><h3>.includes()</h3><p>Checks if the given expression exists in a string and returns a boolean(true or false). İncludes is case sensitive.</p><pre>products.some((product) =&gt; product.name.includes(&quot;Pencil&quot;)); // true, Some product names contain Pencil<br>products.every((product) =&gt; product.name.includes(&quot;Pencil&quot;)); // false, All product names do not contain Pencil</pre><h3>.map()</h3><p>It applies the entered callback function to the given array elements and creates a new array with the results obtained. Simply put, it helps us create a new set of array based on an existing one.</p><p>Keep in mind that the resulting array will always be the same length as the original array.</p><pre>products.map((product) =&gt; `${product.name} price ${product.price} was dollars.`);<br>// [&quot;The price of the pencil is $5.&quot;, &quot;The price of the notebook is $10.&quot;, &quot;The price of the eraser is $2.&quot;, &quot;The price of the sharpener is $7.&quot;]</pre><p><strong>In React Native:</strong></p><pre>function ShowProducts({ productList }) {<br>  return productList.map((product) =&gt; &lt;Text key={product.id}&gt;{product.name}&lt;/Text&gt;);<br>}</pre><h3>.filter()</h3><p>Just as it sounds, it works similar to the way the .map()method works. Applies the entered callback function to the given array elements. Eliminates results returning false and creates a new array with results returning true.</p><pre>products.filter((product) =&gt; product.name.includes(&quot;Pencil&quot;)); // [{id: 1, name: &quot;Pencil&quot;, price: 5}, {id: 4, name: &quot;Sharpener&quot;, price: 7}]</pre><p>💡 Because both .filter() and.map() return a new array, they can be added together to be used on a single line.</p><pre>products<br>  .filter((product) =&gt; product.name.includes(&quot;Pencil&quot;)) // Find products with Pencil first<br>  .map((product) =&gt; `${product.name} price ${product.price} was dollars.`); // Then apply the given callback function to the found elements<br><br>// [&quot;The price of the pencil is $5.&quot;, &quot;The price of the sharpener is $7.&quot;]</pre><h3>.reduce()</h3><p>It applies the callback function given as reducer on the elements of the given array. The result returned by this function is remembered in each loop and the next returned result is added to the previous one. The reducer function takes four parameters: accumulator (the sum of the result from each loop), current value (value of the next value in the array), current index (position of the next value in the array), and source array (array on which reduce is applied).</p><p>.reduce() it can also take an initial value as a second parameter. For mathematical operations, a number will be entered as a start, as well as string, array, etc. can also be entered.</p><p><strong>The total price of the products in the list:</strong></p><pre>products.reduce((total, product) =&gt; total + product.price, 0); // 24</pre><p><strong>Writing product names in one line:</strong></p><pre>products.reduce((names, product) =&gt; names + &quot; &quot; + product.name, &quot;Product Names:&quot;); // &quot;Product Names: Pencil Notebook Eraser Sharpener&quot;</pre><p><strong>Creating a string from the product names and prices and creating it as a new array:</strong></p><pre>products.reduce(<br>  (newProductList, product) =&gt; [<br>    ...newProductList,<br>    `${product.name} ${product.fiyat} was dollars.`,<br>  ],<br>  [] // Initial value is empty array<br>);<br>// [&quot;The price of the pencil is $5.&quot;, &quot;The price of the notebook is $10.&quot;, &quot;The price of the eraser is $2.&quot;, &quot;The price of the sharpener is $7.&quot;]</pre><p>If you found this article interesting do clap for me with the clap icon.</p><p>Keep coding!</p><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a><strong><em>.</em></strong><em> Sign up for our</em><strong><em> </em></strong><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter here</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d469b7f10447" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/react-native-array-methods-d469b7f10447">A Guide to React Native Array Methods</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>