Javascript a = b = c语句 [英] Javascript a=b=c statements

查看:1542
本文介绍了Javascript a = b = c语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了互联网,但找不到相关的搜索条件,所以我认为这是最好的问题。

I searched through the internets but could not find a relevant search criteria so I thought this would be the best place to ask.

我有一条JS声明说

document.location.hash = this.slug = this.sliceHashFromHref(href)

这是如何工作的?

推荐答案

它从右到左进行评估。 ie

It gets evaluted from right to left. i.e.

document.location.hash = this.slug = this.sliceHashFromHref(href)

表示的输出/值this.sliceHashFromHref(href)已分配给 this.slug 然后到 document.location.hash

这篇关于Javascript a = b = c语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆