On Tuesday, May 17, 2016 at 9:36:32 PM UTC-7, jeki...@prodigy.net wrote:
>
> Hello;
> I have been doing browser javascript since 2003. I have also been doing 
> php on the serverside. But I have become very interested in exploring 
> node.js.
>
> In the documentation on the Node.js site I see example code with 
> constructs I am not familiar with:
>
> sample 1 syntax
>   fs.unlink('/tmp/hello', (err) => {
>   if (err) throw err;
>   console.log('successfully deleted /tmp/hello');
> });
>
> I am unfamiliare with "(err) =>". I have not seen this in javascript before
>
> then there is:
>
> sample 2 syntax
> fs.watch('somedir', (event, filename) => {
>   console.log(`event is: ${event}`);
>   if (filename) {
>     console.log(`filename provided: ${filename}`);
>   } else {
>     console.log('filename not provided');
>   }
> });
>
> I am unfamiliar with this construct: "${event}". 
> I have seen this in php as variable variable references.
> But this is not php. I was of the understanding that $ is
> a valid and non special chararcter that can be used as 
> and identifier (although it shows up as the reference to
> matches return from regex function)
>
> Is there some published documentation that would clarify 
> and explain these constructs for me?
>
> Thank you for time and attention.
>
> PS I have successfully set up an http server with some elaborations based 
> on
> instructions from the Apress publication 'Beginning Node.js'
>
> My set up services background requests of external css source files, image 
> files
> designated for background rules, and external javascript files. But I am 
> uncertain
> how an actuall "ajax" xmlHttpRequest object request would be handled from 
> the 
> server's standpoint.
>
> Thanks anew
>
> JK
>

Thanks for responses; Dut Nguyen and Emanuele DelBono,  Your references 
have done a good job for me. 

I would use stackOverflow for questions, but I managed to annoy someone to 
the point of being banned. I
also can't get answers to why for them.

JK

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/e65a7af7-73b0-4d97-be5c-a96ad15eb07d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to