Skip to main content

Posts

charCodeAt()

  JavaScript String charCodeAt() The  charCodeAt()  the method returns the Unicode of the character at a specified index in a string: The method returns a UTF-16 code (an integer between 0 and 65535). --------- <!DOCTYPE html> <html> <body> <h2>JavaScript String Methods</h2> <p>The charCodeAt() method returns the unicode of the character at a given position in a string:</p> <p id="demo"></p> <script> let text = "HELLO WORLD"; document.getElementById("demo").innerHTML = text.charCodeAt(0); </script> </body> </html> ------------------------------------------ Result: JavaScript String Methods The charCodeAt() method returns the Unicode of the character at a given position in a string: 72

Substring

  JavaScript String substring() substring()  is similar to  slice() . The difference is that start and end values less than 0 are treated as 0 in  substring() . <!DOCTYPE html> <html> <body> <h2>JavaScript String Methods</h2> <p>The substring() method extract a part of a string and returns the extracted parts in a new string:</p> <p id="demo"></p> <script> let str = "Apple, Banana, Kiwi"; document.getElementById("demo").innerHTML = str.substring(7,13); </script> </body> </html> =============== Result: JavaScript String Methods The substring() method extracts a part of a string and returns the extracted parts in a new string: Banana

JavaScript String Methods

 JavaScript String Methods String methods help you to work with strings. String Methods and Properties Primitive values, like "John Doe", cannot have properties or methods (because they are not objects). But with JavaScript, methods, and properties are also available to primitive values, because JavaScript treats primitive values as objects when executing methods and properties. JavaScript String Length The length property returns the length of a string: ==================== <!DOCTYPE html> <html> <body>   <h2>JavaScript String Properties</h2>   <p>The length property returns the length of a string:</p>   <p id="demo"></p>   <script>   let text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";   document.getElementById("demo").innerHTML = text.length;   </script> </body> </html> ==================== Result: JavaScript String Properties The length property returns the length of a string: ...

JavaScript String Methods

Java Script  --------------------------  <!DOCTYPE html> <html> <body> <h2>JavaScript String Methods</h2> <p>Using String.split():</p> <p id="demo"></p> <script> let text = "Hello"; const myArr = text.split(""); text = ""; for (let i = 0; i < myArr.length; i++) {   text += myArr[i] + "<br>" } document.getElementById("demo").innerHTML = text; </script> </body> </html> ========= Result: JavaScript String Methods Using String.split(): H e l l o

ข่าวสดสายตรงจากวีโอเอ ภาคภาษาไทย

ข่าวสดสายตรงจากวีโอเอ ภาคภาษาไทย วันจันทร์ ที่ 11 เมษายน 2565 • ยูเครนเตือนประชาชนอพยพด่วน! หลังรัสเซียระดมโจมตีภาคตะวันออกรอบใหม่ • ปูตินแต่งตั้งผู้บัญชาการกองทัพคนใหม่ดูแลสงครามยูเครน • ชาวศรีลังกาบุกยึดสำนักงานประธานาธิบดีสองวันติดต่อกัน • ไขปัญหา: โควิดจะกลายพันธุ์ในสัตว์แล้วระบาดกลับสู่มนุษย์อีกหรือไม่?

Meak Bochea

Meak Bochea Day in Cambodia In Cambodia, Meak Bochea Day is an important religious festival.  It is observed on the full moon in the third month of the Khmer calendar, which generally lands in later February or early March.  Meak Bochea Day commemorates the final sermon given by Buddha, in which he summarized the “heart of Buddhism” in three principles: ceasing from all evil, doing only what is good, and cleansing the mind. The group that assembled that day, around 2,500 years ago now, to hear him preach are sometimes called the “Fourfold Assembly” because of four factors that were in place: the 1,250 listeners were all “enlightened ones,” they were all ordained by Buddha himself, they came, according to the tradition, without being summoned, and it was a full moon in the month of Magha.  It is also said that, on this day, Buddha correctly predicted the day of his own death, which occurred three months later. The day of his death was also the day of his birth and of his p...

XCOPY

 XCOPY  with slash XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]                            [/C] [/I] [/-I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T]                            [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/J]                            [/EXCLUDE:file1[+file2][+file3]...] [/COMPRESS]   source       Specifies the file(s) to copy.   destination  Specifies the location and/or name of new files.   /A           Copies only files with the archive attribute set,                doesn't change the attribute.   /M           Copies only files with the archive attribute set,        ...