Timeline for JavaScript check for undefined
Current License: CC BY-SA 4.0
Post Revisions
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Jan 19, 2023 at 5:01 | history | edited | Michael M. | CC BY-SA 4.0 |
Added code in code snippet
|
| S Jan 19, 2023 at 5:01 | history | suggested | Ahmad Habib | CC BY-SA 4.0 |
Added code in code snippet
|
| Jan 18, 2023 at 12:23 | review | Suggested edits | |||
| S Jan 19, 2023 at 5:01 | |||||
| Dec 9, 2020 at 11:08 | vote | accept | Ronnie Oosting | ||
| Dec 9, 2020 at 10:36 | answer | added | kmp | timeline score: 1 | |
| Dec 9, 2020 at 10:25 | comment | added | Ronnie Oosting | Thank you all! Answer from Muhammad works! | |
| Dec 9, 2020 at 10:25 | answer | added | Mark Baijens | timeline score: 1 | |
| Dec 9, 2020 at 10:20 | comment | added | FZs |
You can use the conditional chaining operator (?.)
|
|
| Dec 9, 2020 at 10:19 | comment | added | abhay | I think first you need to check content.context_data have custome_topic or not. | |
| Dec 9, 2020 at 10:19 | comment | added | Bjørn Nyborg |
Can't you do: if(content.context_data !== null && content.context_data.custom_topic !== undefined)? π
|
|
| Dec 9, 2020 at 10:18 | answer | added | Muhammad Zeeshan | timeline score: 3 | |
| Dec 9, 2020 at 10:15 | history | asked | Ronnie Oosting | CC BY-SA 4.0 |