JavaScript运算符宝典

发表于 2年以前  | 总阅读数:360 次

这篇文章将详细介绍JavaScript运算符及其用法!

如果我们想导航运算符的话,可以通过cmd + fctrl + f,然后放置你需要的运算符,运算符后面跟:

举个例子:如果你想查找...运算符的话,可以这样写 ...:

P.s.人气指数非官方定义,仅图一乐。

灵巧的运算符

+:加法|一元加

人气指数:★★★★☆

如果在操作数之前使用+运算符,那么+就成为了一元加运算符。

一元加运算符位于操作数之前并计算操作数,并试图将操作数转换为数字(如果不是数字的话)。

const x = 1
const y = -1

console.log(+x)
// expected output: 1

console.log(+y)
// expected output: -1

console.log(+'')
// expected output: 0

console.log(+true)
// expected output: 1

console.log(+false)
// expected output: 0

console.log(+'hello')
// expected output: NaN

注意:如果将一元加运算符与不是数字的字符串一起使用,则返回NaN(not a number)

如果在其他上下文中使用+运算符,则用作加法运算符。

将产生除字符串之外的数字操作数的总和。

注意:它会将布尔值转换为数字,将对象转换为数字。

console.log(2 + 4) // 6
console.log(2 + true) // 3

当你将它与字符串一起使用时,将进行字符串连接

const name = 'code oz'
console.log('hello ' + 'my name is ' + name)

注意:你应该使用模板字符串代替连接。

-: 减法|一元否定

人气指数:★★★★☆

如果在操作数之前使用-运算符,那么-将用作一元否定运算符。

一元否定运算符位于操作数之前进行否定。

注意:它会将布尔值转换为数字,将对象转换为数字,将字符串转换为数字

const a = 5
console.log(-a) // -5
console.log(-'1') // -1

注意:如果将其与不是数字的字符串一起使用,则返回NaN(not a number)

如果在其他上下文中使用-运算符,则用作减法运算符。

减去两个操作数,产生它们的差。

console.log(5 - 3)
// expected output: 2

console.log(3.5 - 5)
// expected output: -1.5

console.log(5 - 'hello')
// expected output: NaN

console.log(5 - true)
// expected output: 4

...:扩展|rest参数

如果在函数参数中使用...运算符,它将用作rest运算符。

它允许函数拥有无限数量的参数!

let arr = [3, 5, 1]

Math.max(...arr) // 5 (spread turns array into a list of arguments)

如果在其他上下文中使用...运算符,它将用作扩展运算符。

如果将其用作函数中的参数:它将允许可迭代,例如函数参数中的数组表达式。

// rest parameter is handle as array in the function
const add = (...rest) => {
   return rest.reduce((total, current) => total + current)
}

// Nice your function can handle different number of parameters !
add(1, 2, 3)
add(1, 2, 3, 4, 5)

你还可以使用它从数组或对象中提取值。

// We extract the first Item of the array into the variable and the others variable in an array named others
const [ firstItem, ...others ] = [ 1, 2, 3, 4 ]
firstItem // 1
others // [ 2, 3, 4 ]
const toto = { a: 1, b: 2, c: 3 }
const { a, ...others } = toto
a // 1, we extract the a key from toto object
others // { b: 2, c: 3 }, we extract other key in the object thanks to rest operator 

注意:当你在做const toto = { ...anotherObject }时,它等于const toto = Object.assign({}, anotherObject)

逻辑运算符

首先我们要知道:Javascript中的所有值都是假值或真值,这意味着你可以对任何值进行布尔计算,并获得布尔值。在Javascript中,除0nullundefinedNaN、空字符串外,其他所有值都是真值。

&&:逻辑与

人气指数:★★★★★

用于检查所有值(通常值为条件)是否为真。

它将返回第一个值falsy,否则返回最终值。

const isTrue = true
const isFalse = false


const value = isFalse && isTrue // will return false 
const valueBis = isTrue && isFalse // will return false

const toto = 5 && 3 && 1 // will return 1 since all value before are true (5 & 3)

const tutu = 5 && 0 && 2 // will return 0 since it's the first falsy value

if (firstCondition && secondCondition) { console.log('hello') } // console log will be shown only if both condition are true!

&&=:逻辑与赋值

人气指数:★☆☆☆☆

仅当传递的值为真时才赋值。

let toto = 0
let tutu = 2

toto &&= 5 // toto value will be NOT changed since toto is falsy (0)
tutu &&= 3 // tutu value will be replaced by 3 since tutu is trusly (2)

// toto &&= 5 It's a shortcut of 

let toto = 0 

toto = toto && 5

||:逻辑或

人气指数:★★★★☆

用于检查一组值中的一个值(通常值是条件)是否为真。

它将返回第一个值truthy,否则返回最终值。


const isTrue = true
const isFalse = false

const value = isFalse || isTrue // will return true 
const valueBis = isTrue || isFalse // will return true

const toto = 5 || 3 || 1 // will return 5 since it's the first truthy value

const tutu = 0 || 2 || 5 // will return 2 since it's the first truthy value

if (firstCondition || secondCondition) { console.log('hello') } // console log will be shown if one condition matches!

||=:逻辑或赋值

人气指数:★☆☆☆☆

仅当传递的值为假时才赋值。


let toto = 0
let tutu = 2

toto ||= 5 // toto value will be replaced by 5 since toto is falsy (0)
tutu ||= 3 // tutu value will NOT changed since tutu is not a falsy value (2)

// toto ||= 5 It's a shortcut of 

let toto = 0 

toto = toto || 5

??: 逻辑空合并

人气:★★★☆☆

当其左侧操作数为nullundefined (空值)时,返回其右侧操作数。

const toto = 0 ?? 55 // 0 since 0 is not equal to nullish value.
const tutu = null ?? 'hello' // 'hello' since the right-hand side is equal to `null`
const tata = undefined ?? 55 // '55 since the right-hand side is equal to `undefined`
const titi = null ?? undefined // undefined since the right-hand side is equal to `null`

注意:??运算符与||不同,因此当你需要根据其他值来赋值时,应该选择正确的运算符!

const toto = 0 || 55 // 55 since 0 is a falsy value
const titi = 0 ?? 55 // 0 since 0 is different of nullish value

const tutu = undefined || 55 // 55 since undefined is a falsy value
const tata = undefined ?? 55 // 55 since undefined is equal to nullish value

??=: 逻辑空赋值

人气指数:★☆☆☆☆

仅当传递的值等于nullundefined (nullish)时才赋值。

let toto = null
toto ??= 55 // toto is equal to 55 since it's a nullish value (null)

let tutu = 90
tutu ??= 23 // toto is equal to 90 since it's not a nullish value (90)
// toto ??= 5 It's a shortcut of 

let toto = null

toto = toto ?? 5 // Equal to 5 since toto is equal to null

!: 逻辑非

人气指数:★★★★★

将真值交换为假值,将假值交换为真值。

还会将任何值转换为布尔值。所以所有真值都变成假值,反之亦然。

提示:我经常使用双逻辑运算符来将任何值转换为布尔值。它相当于使用布尔值(任何值哦)

console.log(!true) // false
console.log(!true) // true
console.log(!0) // false
console.log(!1) // true

console.log(!{}) // false
console.log(![]) // false
console.log(!undefined) // true

// My tips 
console.log(!!{}) // true, equal to Boolean({})
console.log(!![]) // true, equal to Boolean([])

if (!!value) { ... } // I use a lot in order to check if a value is defined or undefined! (Be careful, if the value is equal to `0` it will be false!)

特殊运算符

?.: 可选链

人气指数:★★★★☆

它允许访问对象上的属性,而无需检查链中的每个引用是否有效。

是不是不明白?看看下面的例子你就知道了:

const toto = { a: { b: 5 } }
toto.a // { b: 5 }
toto.a.b // 5
toto.a.b.c // undefined
toto.a.b.c.d // Uncaught TypeError: Cannot read properties of undefined

实际上,当你尝试访问未定义属性上的属性时,Javascript引擎将触发错误!

所以为了安全起见,我们需要像这样做:

const toto = { a: { b: 5 } }

if (toto.a && toto.a.b && toto.a.b.c && toto.a.b.c.d) {
    console.log(toto.a.b.c.d) // It's safe to use it since we check before if the property exist!
}

但是这样不太方便,是吧?

所以可选链来拯救我们了。

如上所示,你可以尝试访问一个属性,而无需检查之前是否存在所有属性!你只需要在属性上使用此运算符,如果该属性不存在,则返回undefined

const toto = { a: { b: 5 } }
toto?.a?.b // 5
toto?.a?.b?.c?.d // undefined

?: 三元运算符

人气指数:★★★★☆

这是JavaScript中唯一需要两个伪操作数(?:)的运算符。它根据条件是假还是真来评估条件。等价于if (...) & else (...)

console.log(true ? 55 : 10) // 55
console.log(0 ? 13 : 34) // 34

const toto = 2 > 1
console.log(toto ? 'ok' : 'not ok')

//  It's a shortcut of 

if (toto) {
    console.log('ok')
} else {
    console.log('not ok')
}

比较运算符

==:相等

人气指数:★☆☆☆☆

检查两个操作数是否相等,并返回布尔结果。与===(严格相等运算符)不同,它尝试转换(进行隐式强制)并比较不同类型的操作数。

下面是如何完成隐式强制的示例!

// 1) Not the same type so implicit coercion will be made
'24' == 24

// 2) Convert string into number so 
Number('24') == 24

// 3) We got an number so we can check value
24 == 24 // true !

通常,你应该使用===(严格相等),并避免使用此运算符!

===:严格相等

人气指数:★★★★★

检查两个操作数是否相等,并返回布尔结果。与==(相等运算符)不同,严格相等运算符始终认为不同类型的操作数是不同的。

console.log(1 === 1)
// expected output: true

console.log('hello' === 'hello')
// expected output: true

console.log('1' ===  1)
// expected output: false

console.log(0 === false)
// expected output: false

你应该始终使用此运算符而不是==(相等运算符)!

!=: 不等于

人气指数:★☆☆☆☆

检查两个操作数是否不相等,并返回布尔结果。与!==(严格不等于运算符)不同,它尝试转换和比较不同类型的操作数。

console.log(1 != 1)
// expected output: false

console.log('hello' != 'hello')
// expected output: false

console.log('1' !=  1)
// expected output: false

console.log(0 != false)
// expected output: false

通常,你应该使用!==(严格不等于)并避免使用此运算符!

!==: 严格不等于

人气:★★★★★

检查两个操作数是否不相等,并返回布尔结果。与!=(不等于运算符)不同,严格不等于运算符始终认为不同类型的操作数是不同的。

console.log(1 !== 1)
// expected output: false

console.log('hello' !== 'hello')
// expected output: false

console.log('1' !==  1)
// expected output: true

console.log(0 !== false)
// expected output: true

你应该始终使用此运算符而不是!=(不等于)!

>:大于

人气指数:★★★★☆

如果左操作数大于右操作数,则返回true,否则返回false。

console.log(5 > 3)
// expected output: true

console.log(3 > 3)
// expected output: false

console.log('ab' > 'aa')
// expected output: true

>=:大于或等于

人气指数:★★★★☆

如果左操作数大于或等于右操作数,则返回true,否则返回false。


console.log(5 >= 3)
// expected output: true

console.log(3 >= 3)
// expected output: true

console.log('ab' >= 'aa')
// expected output: true

<:小于

人气指数:★★★★☆

如果左操作数小于右操作数,则返回true,否则返回false。

console.log(5 < 3)
// expected output: false

console.log(3 < 3)
// expected output: false

console.log('aa' < 'ab')
// expected output: true

<=:小于或等于

人气:★★★★☆

如果左操作数小于或等于右操作数,则返回true,否则返回false。

console.log(5 <= 3)
// expected output: false

console.log(3 <= 3)
// expected output: true

// Compare bigint to number (note: bigint is not supported in all browsers)
console.log(3n <= 5)
// expected output: true

console.log('aa' <= 'ab')
// expected output: true

算术运算符

+=:加法赋值

人气指数:★★★☆☆

右操作数的值加到变量,并将结果赋值给变量。

let a = 5
let b = 3

b += a // b will be equal to 8, since we are adding 5 to b variable!

-=:减法赋值

人气指数:★★★☆☆

右操作数的值减去变量,并将结果赋值给变量。

let a = 5
let b = 3

b -= a // b will be equal to 2, since we are subtracting 5 to b variable

*:乘法

人气指数:★★★☆☆

产生操作数的乘积。

let a = 5
let b = 3

let c = a * b // 15

*=:乘法赋值

人气:★★★☆☆

右操作数的值乘以变量,并将结果赋给变量。

let a = 5
let b = 3

b *= a // 15

/:除法

人气指数:★★★☆☆

产生操作数的商,其中左操作数是被除数,右操作数是除数。

let a = 10
let b = 2

let c = a / b // 2

console.log(1 / 0) // Infinity

/=:除法赋值

人气:★★★☆☆

右操作数的值除以变量,并将结果赋给变量。

let a = 10
let b = 2

b /= a // 2

**:求幂

人气指数:★★★☆☆

返回第一个操作数作为底数,第二个操作数作为指数的求幂结果。等同于Math.pow,不同在于**也接受BigInts作为操作数。

let a = 10
let b = 2

let c = a ** b // 100, it equals to 10^2 or Math.pow(10, 2)

**=:求幂赋值

人气:★★★☆☆

将变量的值提升到右操作数的幂。

let a = 10
let b = 2

b **= a // 1024, it equals to 2^10 or Math.pow(2, 10)
a **= b // 100, it equals to 10^2 or Math.pow(10, 2)

%:余数(取模)

人气指数:★☆☆☆☆

返回一个操作数除以第二个操作数时剩余的余数。总是带被除数的符号。

let a = 10
let b = 3

let c = a % b // 1

%=: 余数赋值

人气:★☆☆☆☆

变量除以右操作数的值,并将余数赋值给变量。

let a = 10
let b = 3

a %= b // 1 it's equal to a % b

++:增量

人气指数:★★★☆☆

增加(加一)操作数并返回一个值。

你可以通过两种方式使用:

作为预增量:在操作前增加值


let toto = 55

console.log(toto) // 55
console.log(++toto) // 56
console.log(toto) // 56

作为后增量:在操作后增加值

let toto = 55

console.log(toto) // 55
console.log(toto++) // 55
console.log(toto) // 56

--:减量

人气指数:★★★☆☆

减少(减一)操作数并返回一个值。

你可以通过两种方式使用:

作为预减量:在操作前递减值

let toto = 55

console.log(toto) // 55
console.log(--toto) // 54
console.log(toto) // 54

作为后减量:在操作后递减值

let toto = 55

console.log(toto) // 55
console.log(toto--) // 55
console.log(toto) // 54

位运算符

&:按位与

人气指数:★☆☆☆☆

在两个操作数的对应位均为1的每个位位置返回1。

注意:不要混淆&&&运算符。&&是逻辑运算符AND

const a = 5        // 00000000000000000000000000000101
const b = 3        // 00000000000000000000000000000011

console.log(a & b) // 00000000000000000000000000000001

小提示:如果你需要检查一个数是否为偶数,可以使用numberVar & 1,如果结果等于0,那就是偶数!

&=:按位与赋值

人气指数:★☆☆☆☆

使用两个操作数的二进制表示,对它们进行按位与运算并将结果分配给变量。

let a = 5      // 00000000000000000000000000000101
a &= 3         // 00000000000000000000000000000011

~:按位取反

人气:★☆☆☆☆

取反操作数的位。与其他按位运算符一样,将操作数转换为32位有符号整数

const a = 5     // 00000000000000000000000000000101
const b = -3    // 11111111111111111111111111111101

console.log(~a) // 11111111111111111111111111111010
// expected output: -6

console.log(~b) // 00000000000000000000000000000010
// expected output: 2

|: 按位或

人气:★☆☆☆☆

在其中一个操作数或两个操作数的相应位为1时,在每个位位置返回一个1。

const a = 5        // 00000000000000000000000000000101
const b = 3        // 00000000000000000000000000000011

console.log(a | b) // 00000000000000000000000000000111
// expected output: 7

|=:按位或赋值

人气指数:★☆☆☆☆

使用两个操作数的二进制表示,对它们进行按位或运算并将结果分配给变量。

let a = 5      // 00000000000000000000000000000101
a |= 3         // 00000000000000000000000000000011

console.log(a) // 00000000000000000000000000000111
// expected output: 7

^:按位异或

人气指数:★☆☆☆☆

当其中任一操作数但不是两个操作数的相应位是1时,在每个位位置返回一个1。

const a = 5        // 00000000000000000000000000000101
const b = 3        // 00000000000000000000000000000011

console.log(a ^ b) // 00000000000000000000000000000110

^=:按位异或赋值

人气指数:★☆☆☆☆

使用两个操作数的二进制表示,对它们进行按位异或运算并将结果分配给变量。


let a = 5      // 00000000000000000000000000000101
a ^= 3         // 00000000000000000000000000000011

console.log(a) // 00000000000000000000000000000110
// expected output: 6

<<: 按位左移

人气指数:★☆☆☆☆

将第一个操作数向左移动指定的位数。左移的多余位将被丢弃。零位从右侧移入。

const a = 5         // 00000000000000000000000000000101
const b = 2         // 00000000000000000000000000000010

console.log(a << b) // 00000000000000000000000000010100
// expected output: 20

<<=:按位左移赋值

人气指数:★☆☆☆☆

向左移动指定数量的位并将结果赋值给变量。

let a = 5 // 00000000000000000000000000000101

a <<= 2   // 00000000000000000000000000010100

console.log(a)
// expected output: 20

>>:右移

人气指数:★☆☆☆☆

将第一个操作数向右移动指定的位数。右移的多余位将被丢弃。最左侧位的副本从左边移入。

由于新的最左侧位与前一个最左侧位具有相同的值,因此符号位(最左侧位)不会改变。所以又叫做符号传播。

const a = 5          //  00000000000000000000000000000101
const b = 2          //  00000000000000000000000000000010
const c = -5         // -00000000000000000000000000000101

console.log(a >> b)  //  00000000000000000000000000000001
// expected output: 1

console.log(c >> b)  // -00000000000000000000000000000010
// expected output: -2

>>=:按位右移赋值

人气指数:★☆☆☆☆

向右移动指定数量的位并将结果赋值给变量。

let a = 5      //  00000000000000000000000000000101

a >>= 2        //  00000000000000000000000000000001
console.log(a)
// expected output: 1

let b = -5     // -00000000000000000000000000000101

b >>= 2        // -00000000000000000000000000000010
console.log(b)
// expected output: -2

>>>:无符号右移

人气指数:★☆☆☆☆

将第一个操作数向右移动指定的位数。右移的多余位将被丢弃。

零位从左侧移入。

符号位变为0,因此结果始终为非负。与其他按位运算符不同,0填充的右移返回一个无符号的32位整数。

const a = 5          //  00000000000000000000000000000101
const b = 2          //  00000000000000000000000000000010
const c = -5         // -00000000000000000000000000000101

console.log(a >>> b) //  00000000000000000000000000000001
// expected output: 1

console.log(c >>> b) //  00111111111111111111111111111110
// expected output: 1073741822

>>>=:无符号右移赋值

人气指数:★☆☆☆☆

向右移动指定数量的位并将结果赋值给变量。

let a = 5 //  00000000000000000000000000000101

a >>>= 2  //  00000000000000000000000000000001
console.log(a)
// expected output: 1

let b = -5 // -00000000000000000000000000000101

b >>>= 2   //  00111111111111111111111111111110
console.log(b)
// expected output: 1073741822

希望这篇教程能对大家有所帮助。祝编码快乐!

本文由哈喽比特于2年以前收录,如有侵权请联系我们。
文章来源:https://mp.weixin.qq.com/s/ckQ_7N2iMdRpdnWz4VWuqA

 相关推荐

刘强东夫妇:“移民美国”传言被驳斥

京东创始人刘强东和其妻子章泽天最近成为了互联网舆论关注的焦点。有关他们“移民美国”和在美国购买豪宅的传言在互联网上广泛传播。然而,京东官方通过微博发言人发布的消息澄清了这些传言,称这些言论纯属虚假信息和蓄意捏造。

发布于:8月以前  |  808次阅读  |  详细内容 »

博主曝三大运营商,将集体采购百万台华为Mate60系列

日前,据博主“@超能数码君老周”爆料,国内三大运营商中国移动、中国电信和中国联通预计将集体采购百万台规模的华为Mate60系列手机。

发布于:8月以前  |  770次阅读  |  详细内容 »

ASML CEO警告:出口管制不是可行做法,不要“逼迫中国大陆创新”

据报道,荷兰半导体设备公司ASML正看到美国对华遏制政策的负面影响。阿斯麦(ASML)CEO彼得·温宁克在一档电视节目中分享了他对中国大陆问题以及该公司面临的出口管制和保护主义的看法。彼得曾在多个场合表达了他对出口管制以及中荷经济关系的担忧。

发布于:8月以前  |  756次阅读  |  详细内容 »

抖音中长视频App青桃更名抖音精选,字节再发力对抗B站

今年早些时候,抖音悄然上线了一款名为“青桃”的 App,Slogan 为“看见你的热爱”,根据应用介绍可知,“青桃”是一个属于年轻人的兴趣知识视频平台,由抖音官方出品的中长视频关联版本,整体风格有些类似B站。

发布于:8月以前  |  648次阅读  |  详细内容 »

威马CDO:中国每百户家庭仅17户有车

日前,威马汽车首席数据官梅松林转发了一份“世界各国地区拥车率排行榜”,同时,他发文表示:中国汽车普及率低于非洲国家尼日利亚,每百户家庭仅17户有车。意大利世界排名第一,每十户中九户有车。

发布于:8月以前  |  589次阅读  |  详细内容 »

研究发现维生素 C 等抗氧化剂会刺激癌症生长和转移

近日,一项新的研究发现,维生素 C 和 E 等抗氧化剂会激活一种机制,刺激癌症肿瘤中新血管的生长,帮助它们生长和扩散。

发布于:8月以前  |  449次阅读  |  详细内容 »

苹果据称正引入3D打印技术,用以生产智能手表的钢质底盘

据媒体援引消息人士报道,苹果公司正在测试使用3D打印技术来生产其智能手表的钢质底盘。消息传出后,3D系统一度大涨超10%,不过截至周三收盘,该股涨幅回落至2%以内。

发布于:8月以前  |  446次阅读  |  详细内容 »

千万级抖音网红秀才账号被封禁

9月2日,坐拥千万粉丝的网红主播“秀才”账号被封禁,在社交媒体平台上引发热议。平台相关负责人表示,“秀才”账号违反平台相关规定,已封禁。据知情人士透露,秀才近期被举报存在违法行为,这可能是他被封禁的部分原因。据悉,“秀才”年龄39岁,是安徽省亳州市蒙城县人,抖音网红,粉丝数量超1200万。他曾被称为“中老年...

发布于:8月以前  |  445次阅读  |  详细内容 »

亚马逊股东起诉公司和贝索斯,称其在购买卫星发射服务时忽视了 SpaceX

9月3日消息,亚马逊的一些股东,包括持有该公司股票的一家养老基金,日前对亚马逊、其创始人贝索斯和其董事会提起诉讼,指控他们在为 Project Kuiper 卫星星座项目购买发射服务时“违反了信义义务”。

发布于:8月以前  |  444次阅读  |  详细内容 »

苹果上线AppsbyApple网站,以推广自家应用程序

据消息,为推广自家应用,苹果现推出了一个名为“Apps by Apple”的网站,展示了苹果为旗下产品(如 iPhone、iPad、Apple Watch、Mac 和 Apple TV)开发的各种应用程序。

发布于:8月以前  |  442次阅读  |  详细内容 »

特斯拉美国降价引发投资者不满:“这是短期麻醉剂”

特斯拉本周在美国大幅下调Model S和X售价,引发了该公司一些最坚定支持者的不满。知名特斯拉多头、未来基金(Future Fund)管理合伙人加里·布莱克发帖称,降价是一种“短期麻醉剂”,会让潜在客户等待进一步降价。

发布于:8月以前  |  441次阅读  |  详细内容 »

光刻机巨头阿斯麦:拿到许可,继续对华出口

据外媒9月2日报道,荷兰半导体设备制造商阿斯麦称,尽管荷兰政府颁布的半导体设备出口管制新规9月正式生效,但该公司已获得在2023年底以前向中国运送受限制芯片制造机器的许可。

发布于:8月以前  |  437次阅读  |  详细内容 »

马斯克与库克首次隔空合作:为苹果提供卫星服务

近日,根据美国证券交易委员会的文件显示,苹果卫星服务提供商 Globalstar 近期向马斯克旗下的 SpaceX 支付 6400 万美元(约 4.65 亿元人民币)。用于在 2023-2025 年期间,发射卫星,进一步扩展苹果 iPhone 系列的 SOS 卫星服务。

发布于:8月以前  |  430次阅读  |  详细内容 »

𝕏(推特)调整隐私政策,可拿用户发布的信息训练 AI 模型

据报道,马斯克旗下社交平台𝕏(推特)日前调整了隐私政策,允许 𝕏 使用用户发布的信息来训练其人工智能(AI)模型。新的隐私政策将于 9 月 29 日生效。新政策规定,𝕏可能会使用所收集到的平台信息和公开可用的信息,来帮助训练 𝕏 的机器学习或人工智能模型。

发布于:8月以前  |  428次阅读  |  详细内容 »

荣耀CEO谈华为手机回归:替老同事们高兴,对行业也是好事

9月2日,荣耀CEO赵明在采访中谈及华为手机回归时表示,替老同事们高兴,觉得手机行业,由于华为的回归,让竞争充满了更多的可能性和更多的魅力,对行业来说也是件好事。

发布于:8月以前  |  423次阅读  |  详细内容 »

AI操控无人机能力超越人类冠军

《自然》30日发表的一篇论文报道了一个名为Swift的人工智能(AI)系统,该系统驾驶无人机的能力可在真实世界中一对一冠军赛里战胜人类对手。

发布于:8月以前  |  423次阅读  |  详细内容 »

AI生成的蘑菇科普书存在可致命错误

近日,非营利组织纽约真菌学会(NYMS)发出警告,表示亚马逊为代表的电商平台上,充斥着各种AI生成的蘑菇觅食科普书籍,其中存在诸多错误。

发布于:8月以前  |  420次阅读  |  详细内容 »

社交媒体平台𝕏计划收集用户生物识别数据与工作教育经历

社交媒体平台𝕏(原推特)新隐私政策提到:“在您同意的情况下,我们可能出于安全、安保和身份识别目的收集和使用您的生物识别信息。”

发布于:8月以前  |  411次阅读  |  详细内容 »

国产扫地机器人热销欧洲,国产割草机器人抢占欧洲草坪

2023年德国柏林消费电子展上,各大企业都带来了最新的理念和产品,而高端化、本土化的中国产品正在不断吸引欧洲等国际市场的目光。

发布于:8月以前  |  406次阅读  |  详细内容 »

罗永浩吐槽iPhone15和14不会有区别,除了序列号变了

罗永浩日前在直播中吐槽苹果即将推出的 iPhone 新品,具体内容为:“以我对我‘子公司’的了解,我认为 iPhone 15 跟 iPhone 14 不会有什么区别的,除了序(列)号变了,这个‘不要脸’的东西,这个‘臭厨子’。

发布于:8月以前  |  398次阅读  |  详细内容 »
 相关文章
Java 中验证时间格式的 4 种方法 1年以前  |  3361次阅读
Java经典面试题答案解析(1-80题) 4年以前  |  2687次阅读
IDEA依赖冲突分析神器—Maven Helper 4年以前  |  2467次阅读
CentOS 配置java应用开机自动启动 3年以前  |  2465次阅读
SpringBoot 控制并发登录的人数教程 4年以前  |  2176次阅读
 目录