JS语法_基础回顾
2021-01-07 07:29
标签:ons console 字符串拼接 i++ pre 回顾 log str1 start JS语法_基础回顾 标签:ons console 字符串拼接 i++ pre 回顾 log str1 start 原文地址:https://www.cnblogs.com/oceans/p/13574948.html数组方法
push
// log
Array.prototype.$push = function () {
for (let i = 0; i
join
// log
let str1 = ‘1‘
let str2 = ‘2‘
let str3 = ‘3‘
let str4 = ‘4‘
let str5 = ‘5‘
let str6 = ‘6‘
let arr = [str1, str2, str3, str4, str5, str6]
let strFinal = ‘‘
function f1() {
for (let i = 0; i
类数组
// log
let obj = {
1: ‘a‘,
2: ‘b‘,
3: ‘c‘,
length: 3,
push: Array.prototype.push
}
obj.push(‘d‘)
console.log(obj)
上一篇:Nginx系列:https配置