There was an error while loading. Please reload this page.
1 parent f9b0d59 commit 36c9cb0Copy full SHA for 36c9cb0
1 file changed
2-ui/1-document/04-searching-elements-dom/article.md
@@ -38,9 +38,8 @@
38
// است elem به نام id با DOM-element ارجاعی به elem
39
elem.style.background = 'red';
40
41
- // id="elem-content" has a hyphen inside, so it can't be a variable name
42
- // درون خود یک خط تیره (-) دارد، پس نمیتواند نام یک متغیر باشد elem-content.
43
- // ...but we can access it using square brackets: window['elem-content']
+ // درون خود یک خط تیره (-) دارد، پس نمیتواند نام یک متغیر باشد elem-content
+ // اما میتوانیم با استفاده از براکت ([]) به آن دسترسی داشته باشیم: window['elem-content']
44
</script>
45
```
46
0 commit comments