Timeline for Does this JavaScript function support keyword arguments?
Current License: CC BY-SA 4.0
36 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 13, 2021 at 2:05 | comment | added | tsh | @ovs Technical speaking, < and > may appear as x = 3 > 2, which is equipment to x = true. But I'm not sure if this behavior is required by this question. Anyway, as this question is about JavaScript, not TypeScript nor JSX, they should not be paired. | |
S Jan 13, 2021 at 0:50 | history | suggested | Peter Mortensen | CC BY-SA 4.0 |
Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/JavaScript>).
|
Jan 13, 2021 at 0:24 | review | Suggested edits | |||
S Jan 13, 2021 at 0:50 | |||||
Jan 12, 2021 at 19:55 | answer | added | Neil | timeline score: 2 | |
Jan 12, 2021 at 14:25 | history | edited | Hood | CC BY-SA 4.0 |
deleted 32 characters in body
|
S Jan 12, 2021 at 14:13 | history | suggested | jazzpi | CC BY-SA 4.0 |
fix example & formatting
|
Jan 12, 2021 at 13:50 | review | Suggested edits | |||
S Jan 12, 2021 at 14:13 | |||||
Jan 12, 2021 at 12:09 | answer | added | ovs | timeline score: 3 | |
Jan 12, 2021 at 11:55 | comment | added | ovs |
On second thought both < and > would break what I had in mind, and your last testcase, which I didn't see before, already includes > .
|
|
Jan 12, 2021 at 11:43 | comment | added | Hood |
@ovs Can you give me an example of an input with ,> or ,< that is a problem for you?
|
|
Jan 12, 2021 at 11:36 | history | became hot network question | |||
Jan 12, 2021 at 10:56 | comment | added | ovs |
Can the input contain < and > ? If so, is it is possible to have one of those directly following , ?
|
|
Jan 12, 2021 at 9:12 | answer | added | Arnauld | timeline score: 2 | |
Jan 12, 2021 at 9:00 | history | tweeted | twitter.com/StackCodeGolf/status/1348917651960115201 | ||
Jan 12, 2021 at 8:16 | answer | added | Kevin Cruijssen | timeline score: 3 | |
Jan 12, 2021 at 6:58 | history | edited | Hood | CC BY-SA 4.0 |
deleted 59 characters in body
|
Jan 12, 2021 at 6:50 | history | edited | Hood | CC BY-SA 4.0 |
deleted 21 characters in body
|
Jan 12, 2021 at 6:36 | answer | added | tsh | timeline score: 3 | |
Jan 12, 2021 at 6:36 | history | edited | Hood | CC BY-SA 4.0 |
added 68 characters in body
|
Jan 12, 2021 at 6:31 | history | edited | Hood | CC BY-SA 4.0 |
added 68 characters in body
|
Jan 12, 2021 at 6:30 | comment | added | Hood |
x, y = function ({z}) {} -- should be false , x, y = ({z}) => {z} should be false . So to answer I think you need to count parens: count up for [({ and down for ])} but you don't have to check which parens are paired with which.
|
|
Jan 12, 2021 at 6:28 | comment | added | Hood |
[x] = {[Symbol.iterator]: [][Symbol.iterator].bind([42])} -- should be false
|
|
Jan 12, 2021 at 6:26 | comment | added | Hood |
x, [y, { z }] -- this is a valid input, should return false
|
|
Jan 12, 2021 at 6:26 | comment | added | Hood |
x, y, { keyword }, -- I thought about ruling out this one, am happy to rule out trailing comma if you think it makes challenge better. If not then answer should be true.
|
|
Jan 12, 2021 at 6:24 | comment | added | Hood |
@tsh ...[x, y, { keyword },] -- I did not realize this would work in a function declaration. I want to rule this out -- I wanted the test to be quite simple and this seems to require "run arbitrary javascript code" as part of the answer. Maybe disallow ... from appearing in input?
|
|
Jan 12, 2021 at 6:20 | comment | added | tsh | @Hood Are these valid inputs? If so, what expected outputs are. If not, what exactly required to be a valid input? | |
Jan 12, 2021 at 6:19 | comment | added | Hood | @tsh What do you mean? Are these extra suggested test cases? Or are you responding to someone else's deleted comments? | |
Jan 12, 2021 at 6:18 | comment | added | tsh |
Maybe... what about: ...[x, y, { keyword },] ; x, y, { keyword }, ;x, [y, { z }] ; [x] = {[Symbol.iterator]: [][Symbol.iterator].bind([42])} ; x, y = function ({z}) {} ; x, y = ({z}) => {z} ?
|
|
Jan 11, 2021 at 17:47 | history | edited | Hood | CC BY-SA 4.0 |
added 489 characters in body
|
Jan 11, 2021 at 17:39 | comment | added | Hood | I was thinking it might be helpful to fix the test cases to make it easier for a computer to read too. | |
Jan 11, 2021 at 17:38 | comment | added | caird coinheringaahin g♦ | I would remove all the test cases which have "unspecified" behaviour (or at the very least, move them to the end), as they make the test cases harder to read | |
Jan 11, 2021 at 17:36 | history | edited | caird coinheringaahin g♦ | CC BY-SA 4.0 |
added 16 characters in body; edited tags; edited tags
|
Jan 11, 2021 at 17:35 | history | edited | Hood | CC BY-SA 4.0 |
added 35 characters in body; edited title
|
Jan 11, 2021 at 17:35 | history | rollback | hyperneutrino♦ |
Rollback to Revision 1
|
|
Jan 11, 2021 at 17:34 | history | edited | hyperneutrino♦ | CC BY-SA 4.0 |
edited tags
|
Jan 11, 2021 at 17:33 | history | asked | Hood | CC BY-SA 4.0 |