前端工程師學習手冊
  • 前端工程師學習手冊
  • 1. Web
    • 1.1 RESTful API
    • 1.2 HTTP status code
    • 1.3 Event bubbling
    • 1.4 在瀏覽器輸入網址並送出後,發生了什麼事?
    • 1.5 什麼是AJAX?
    • 1.6 CORS
    • 1.7 Cookie、LocalStorage、SessionStorage
    • 1.8 MVC VS Flux
  • 2. Javascript
    • 2.1 ES6
      • 2.1.1 var、let、const
      • 2.1.2 Arrow function
      • 2.1.3 Template Literals
      • 2.1.4 Object Literals
      • 2.1.5 Modules
      • 2.1.6 Promise
      • 2.1.7 Spread Operator & Rest Operator
    • 2.2 Array 操作方法
    • 2.3 closure
    • 2.4 hoisting
    • 2.5 Event loop
    • 2.6 Number
    • 2.7 This
  • 3. React
    • 3.1 React 介紹
    • 3.2 lifecycle
    • 3.3 Redux
    • 3.4 Redux-Saga
    • 3.5 Component 與 PureComponent
    • 3.6 Hook
  • 4. CSS
    • 4.1 inline、inline-block
    • 4.2 position
    • 4.3 selector priority
Powered by GitBook
On this page

Was this helpful?

  1. 2. Javascript
  2. 2.1 ES6

2.1.3 Template Literals

改變了以往字串的寫法,不用再用 + 來進行字串與變數的結合。

const name = 'Andy';
// ES5寫法
var str = 'Hello' + name + "!";

// ES6寫法
const str = `Hello ${name}!`;
Previous2.1.2 Arrow functionNext2.1.4 Object Literals

Last updated 6 years ago

Was this helpful?