padStart and padEnd methods | String Object In JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 8

  • @CodeExplained
    @CodeExplained  28 วันที่ผ่านมา

    🚨 Big Announcement! 🚨
    Hey everyone! I've made a big decision for this channel-I've turned off ads on all my videos! That's right, you can now enjoy all my content ad-free! This means I'm earning $0 from ad revenue, but I believe this is the right move to make your viewing experience better.
    If you find my content valuable and want to support my work, there are several ways you can help:
    Like & Share: Simply liking the video and sharing it with friends helps a lot!
    Subscribe & Hit the Bell: Stay updated and never miss a new video.
    TH-cam Thanks: Use the "Thanks" button below to send a one-time donation.
    Join the Channel Community: Get exclusive perks and behind-the-scenes content.
    Buy Me a Coffee: buymeacoffee.com/CodeExplained
    PayPal Donation: www.paypal.com/paypalme/CodeExplained
    Every little bit counts and goes directly to creating more high-quality content for you all. Thank you so much for your continued support!
    Let’s keep growing and learning together! 🌟

  • @hosseinpanahy5358
    @hosseinpanahy5358 ปีที่แล้ว +1

    Incredible

  • @EhKalaneMoung
    @EhKalaneMoung 5 หลายเดือนก่อน

    very clear

  • @stephen1569
    @stephen1569 ปีที่แล้ว

    I can't think of a case but, hypothetically, if one's life actually depended on what padding was output, it may not be so good that JS automatically drops the digit 8, as in
    'abc'.padStart(10, '12345678') // abc1234567
    This seems to circumvent the intent of the programmer and seems to be just a shortcut for the convenience of JS. It might be better to throw an error like "RangeError" so the programmer can try to think of a better solution, imho.
    Similarly for the last example when JS just "willy nilly" decides to not add padding instead of throwing an error.

  • @alirezajabbari1263
    @alirezajabbari1263 7 หลายเดือนก่อน

    Thank you so much! I didn't understand it on w3school!

  • @juanCOD756
    @juanCOD756 ปีที่แล้ว +1

    thank you, you help me now!!

  • @BFGBFW-ABC
    @BFGBFW-ABC ปีที่แล้ว