- Mastering Immutable.js
- Adam Boduch
- 54字
- 2021-07-08 10:30:08
Maps of values
You can use the of() method to create key-value maps:
const myMap = Map.of(
'a', 1,
'b', 2,
'c', 3
);
console.log('myMap', myMap.toJS());
// -> myMap { a: 1, b: 2, c: 3 }
The trick here is to alternate between the key and value arguments that are passed to of().
推薦閱讀
- R語言數據分析從入門到精通
- 機器學習系統:設計和實現
- The Android Game Developer's Handbook
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- Learning RabbitMQ
- Java程序員面試算法寶典
- C語言從入門到精通(第4版)
- Creating Stunning Dashboards with QlikView
- Python機器學習:預測分析核心算法
- Android移動開發案例教程:基于Android Studio開發環境
- Python網絡爬蟲實例教程(視頻講解版)
- Drupal 8 Development:Beginner's Guide(Second Edition)
- MySQL從入門到精通
- 邊做邊學深度強化學習:PyTorch程序設計實踐
- Python數據科學實戰