隐式类型转换 1. isNaN()判断数据类型是不是NaN 返回值为boolean,执行过程中是将数据放到number方法中 isNaN('123'); // 结果:false 2. ++ -- +、-(一元正负运算符) var a = 10; console.log(-a); //结果:-10; ...
分类:
Web程序 时间:
2021-05-24 15:52:51
阅读次数:
0
exchange_declare($exchange, $type, $passive = false, $durable = false, $auto_delete = true, $internal = false, $nowait = false, $arguments = array(), ...
分类:
其他好文 时间:
2021-05-24 15:51:32
阅读次数:
0
async和await是解决异步编程问题的。 promise的then方法链式调用不够优雅 async 修饰的函数同步返回一个promise 使用await必须包裹一个async修饰的函数 async返回的promise的状态由await修饰的promise的状态决定 如果await修饰的promi ...
分类:
其他好文 时间:
2021-05-24 14:54:53
阅读次数:
0
如果数组里的第一个字符串包含了第二个字符串中的所有字母,则返回 true。例如,["hello", "Hello"] 应该返回 true。因为在忽略大小写的情况下,第一个字符串包含了第二个字符串里出现的所有字母。["hello", "hey"] 应该返回 false。因为 hello 并不包含字符 ...
分类:
其他好文 时间:
2021-05-24 13:43:43
阅读次数:
0
bool #布尔类型 True #真 False #假 l = [1,2,3,4] print( 1>2 ) #False print( 4 in l) #True print(1 not in l) #False print( len(l) > 3) #True 比如,想写个while的死循环,可 ...
分类:
其他好文 时间:
2021-05-24 13:31:59
阅读次数:
0
1、关于列表存储数据 2、给定数据,查找数据所在位置;index()在的话则返回所在的位置,不在的话报错 ;str.index('',开始下标,结束下标) 3、count() 统计给定数据在列表出现的次数 4、判断给定数据是否在列表中 in 在的话返回true,不在的话返回false; 5、判断给定 ...
分类:
编程语言 时间:
2021-05-24 13:27:03
阅读次数:
0
#1.方式1 data=[ {"cat_id":1,"name":"北京","parent_id":0}, {"cat_id":2,"name":"上海","parent_id":0}, {"cat_id":3,"name":"沙河","parent_id":1}, {"cat_id":4,"nam ...
分类:
其他好文 时间:
2021-05-24 13:21:10
阅读次数:
0
检查字符串(第一个参数 str)是否以给定的目标字符串(第二个参数 target)结束。这个挑战 可以 用 ES2015 引入的 .endsWith() 方法来解决。但在这个挑战中,请使用 JavaScript 的字符串子串方法。 1 function confirmEnding(str, targ ...
分类:
其他好文 时间:
2021-05-24 13:09:02
阅读次数:
0
这题考察的是读者对于for循环的基础能力,考点为True与False的理解,难度为:1颗星 1 #include<stdio.h> 2 void fun(int n) 3 { 4 // 质数:只有两个正因数(1和自己)的自然数即为质数。 5 // 比1大但不是素数的数称为合数。1和0既非素数也非合数 ...
分类:
其他好文 时间:
2021-05-24 12:46:45
阅读次数:
0
比较运算符: == != < > <= >= 逻辑运算符 或与非 or and not x or y : x为true,则不计算y的值,直接返回ture x为false,则返回y的值 x and y: x为ture,则返回y的值, x为false,则不计算y,直接返回false x not y: x ...
分类:
编程语言 时间:
2021-05-24 12:45:55
阅读次数:
0