🌟 สวัสดีเพื่อน ๆ วันนี้แอดจะมาแชร์ 3 วิธี ง่าย ๆ ในการต่อ String ในภาษา JavaScript นั่นเอง !! มีวิธีไหน และมีรายละเอียดยังไง ไปดูกันเลยยย
.
1️⃣ ต่อ String ด้วยเครื่องหมายบวก (+)
.
const str1 = "Thailand is";
const str2 = "the land of compromise.";
const newStr = str1+' '+str2;
console.log(newStr);
.
📑 ผลลัพธ์
Thailand is the land of compromise.
.
2️⃣ String Template
เราสามารถสร้าง String Template ด้วยเครื่องหมาย Backticks และใส่ข้อความที่ต้องการให้แสดงลงในประโยคได้ เช่น
.
const Name = "Bang Lee";
const steTemp = `My name is ${Name}.`;
console.log(steTemp);
.
📑 ผลลัพธ์
My name is Bang Lee.
.
3️⃣ ใช้ฟังก์ชัน concat()
.
const string1 = "Me";
const string2 = "You";
const NewString = string1.concat(' & ',string2);
console.log(NewString);
.
📑 ผลลัพธ์
Me & You
*การใช้ concat() ต้องแน่ใจแล้วว่าตัวแปรทั้งสองเป็น String ไม่อย่างงั้นจะ Return TypeError ออกมานั่นเอง
.
ส่วนตัวแอดว่าใช้เครื่องหมายบวก ง่ายสุดละ แล้วเพื่อน ๆ ล่ะ ชอบวิธีไหนกันบ้างงง เมนต์มานะ 😆
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
同時也有2部Youtube影片,追蹤數超過12萬的網紅prasertcbs,也在其Youtube影片中提到,การเชื่อมค่าเข้าด้วยกัน เช่น เชื่อมค่าในเซลล์ A1 ซึ่งเก็บชื่อ เข้ากับค่าในเซลล์ B1 ที่เก็บนามสกุล โดยให้มีเครื่องหมายเว้นวรรคคั่นระหว่างชื่อและนามสกุล...
「string concat」的推薦目錄:
- 關於string concat 在 BorntoDev Facebook 的最佳貼文
- 關於string concat 在 prasertcbs Youtube 的最佳解答
- 關於string concat 在 prasertcbs Youtube 的最佳貼文
- 關於string concat 在 JS strings "+" vs concat method [duplicate] - Stack Overflow 的評價
- 關於string concat 在 JavaScript String concat(): Concatenating Strings - JavaScript ... 的評價
- 關於string concat 在 String concatenation in java with examples - YouTube 的評價
- 關於string concat 在 Use string operators and wildcards in Numbers on Mac 的評價
- 關於string concat 在 String concatenation, redux | Claes Redestad's blog 的評價
string concat 在 prasertcbs Youtube 的最佳解答
การเชื่อมค่าเข้าด้วยกัน เช่น เชื่อมค่าในเซลล์ A1 ซึ่งเก็บชื่อ เข้ากับค่าในเซลล์ B1 ที่เก็บนามสกุล โดยให้มีเครื่องหมายเว้นวรรคคั่นระหว่างชื่อและนามสกุล
ดาวน์โหลดไฟล์ตัวอย่างได้ที่ https://goo.gl/Tqc0li
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่ ► https://www.youtube.com/subscription_center?add_user=prasertcbs
สอน Excel ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEMj5LpqxaxWWnanc55Epnt
สอน Excel เบื้องต้น ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEG_nWHhWmV0K2HsLlQ49qV
สอนการสร้างกราฟด้วย Excel ► https://www.youtube.com/playlist?list=PLoTScYm9O0GExxZ3nlVmleu0wvlhGfs3j
สอน PivotTable ► https://www.youtube.com/playlist?list=PLoTScYm9O0GFFdZwK6437TxMXYf7Hrd4I
สอน Excel Table ► https://www.youtube.com/playlist?list=PLoTScYm9O0GERViw9rwiISMWBv8rzT1j3
สอน Power Query ► https://www.youtube.com/playlist?list=PLoTScYm9O0GHrWoIfdwu9p8V2aNGzPauA
สอน Excel Macro/VBA ► https://www.youtube.com/playlist?list=PLoTScYm9O0GHgpbmyNuXP39OUcb0BheaE
สอนเทคนิคการใช้งาน PowerPoint ► https://www.youtube.com/playlist?list=PLoTScYm9O0GEG5JELOjSGqigFN669d5IK
สอนเทคนิคการใช้งาน Word ► https://www.youtube.com/playlist?list=PLoTScYm9O0GG5QrQtl8hmVbg0o8fCCaJT
#prasertcbs_Excel #prasertcbs_ExcelForBusines #prasertcbs #prasertcbs_basic_excel #prasertcbs_chart

string concat 在 prasertcbs Youtube 的最佳貼文
สอนเทคนิคการใช้ฟังก์ชัน
1) การเชื่อมสตริงเข้าด้วยกัน เช่น เชื่อมคอลัมน์ชื่อและคอลัมน์นามสกุลเข้าด้วยกันโดยมีช่องว่างคั่นระหว่างกลาง โดยใช้ &
2) การดึงตัวอักษรในตำแหน่งที่ต้องการของมาจากสตริง ด้วยฟังก์ชัน LEFT, RIGHT, MID
3) การค้นหาตัวอักษรหรือข้อความในเซลล์ด้วยฟังก์ชัน SEARCH, FIND
4) การแทนที่ตัวอักษรหรือข้อความในเซลล์ด้วยฟังก์ชัน SUBSTITUTE
ดาวน์โหลดไฟล์ตัวอย่างประกอบการสอนได้ที่ http://goo.gl/KSlqEZ
============
playlist สอน Excel สำหรับงานบริหารบุคคล
https://www.youtube.com/watch?v=HGa-0mEI0II&list=PLoTScYm9O0GEDTNRoUpg_8hiPJeColJnZ
============
playlist สอน Excel
https://www.youtube.com/playlist?list=PLoTScYm9O0GEMj5LpqxaxWWnanc55Epnt
============
playlist สอนการใช้งาน PivotTable
https://www.youtube.com/playlist?list=PLoTScYm9O0GFFdZwK6437TxMXYf7Hrd4I
============
playlist การสร้างกราฟ แผนภูมิแบบต่าง ๆ ด้วย Excel
https://www.youtube.com/playlist?list=PLoTScYm9O0GExxZ3nlVmleu0wvlhGfs3j
============
playlist การสร้างกราฟ แผนภูมิแบบใหม่ใน Excel 2016
https://www.youtube.com/watch?v=0brII3eyaW8&list=PLoTScYm9O0GHkvWn5LVlo0ZXYMGmOCcEx
============
playlist การใช้ Excel ในการทำงานร่วมกับกับฐานข้อมูล (SQL Server, MySQL, Access)
https://www.youtube.com/watch?v=HfKl6eOfNFo&list=PLoTScYm9O0GGA2sSqNRSXlw0OYuCfDwYk
============
playlist สอนการเขียน Excel VBA และ Macro
https://www.youtube.com/watch?v=InS56wNCUfw&list=PLoTScYm9O0GHgpbmyNuXP39OUcb0BheaE
============
playlist สอนการใช้งาน Excel สำหรับการเงิน
https://www.youtube.com/playlist?list=PLoTScYm9O0GHcen0YDAIIbXewc-621buW
============
playlist ความสามารถใหม่ใน Excel 2016
https://www.youtube.com/watch?v=0brII3eyaW8&list=PLoTScYm9O0GEL6uJG7K1o99mtkKZLmTYb
============
playlist สอนเทคนิคการใช้งาน Word
https://www.youtube.com/watch?v=hSa7e5UkWGU&list=PLoTScYm9O0GG5QrQtl8hmVbg0o8fCCaJT
============
playlist สอนเทคนิคการใช้งาน PowerPoint
https://www.youtube.com/watch?v=pXWyMULdRvA&list=PLoTScYm9O0GEG5JELOjSGqigFN669d5IK
============
เชิญสมัครเป็นสมาชิกของช่องนี้ได้ที่
https://www.youtube.com/subscription_center?add_user=prasertcbs

string concat 在 JavaScript String concat(): Concatenating Strings - JavaScript ... 的推薦與評價
in this tutorial, you'll learn how to use the JavaScript concat() method to concatenate strings and return a new string that contains the combined strings. ... <看更多>
string concat 在 String concatenation in java with examples - YouTube 的推薦與評價

This video covers string concatenation in java, ... 2.by using java string concat method (concat()) The + ... ... <看更多>
string concat 在 JS strings "+" vs concat method [duplicate] - Stack Overflow 的推薦與評價
... <看更多>