We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(() => { let arr = [1, 2, 3, NaN]; if (arr.includes(2)) { // 查找2是否存在于arr数组中 console.log("找到了!"); //>> 找到了! } if (!arr.includes(2, 3)) { // 第二个参数3表示数组下标为3的项,也即第4项开始查找 console.warn("不存在!"); //>> 不存在! } // 下面两行说明 incluedes 和 indexOf 的区别 console.log(arr.includes(NaN)); //true console.log(arr.indexOf(NaN) != -1); //false })();
// 用法一:x ** y let squared = 2 ** 2; // 等同于: 2 * 2 let cubed = 2 ** 3; // 等同于: 2 * 2 * 2
// 用法二:x **= y let a = 2; a **= 2; // 等同于: a = a * a; let b = 3; b **= 3; // 等同于: b = b * b * b;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Array.prototype.includes
指数函数的中缀表示法
The text was updated successfully, but these errors were encountered: