April 9, 2018

Sreekanth B

Infosys CoffeeScript Recently Asked Interview Questions Answer

What are the basic rules to remember for Coffee Script?

The basic rule for Coffee Script

Whitespace matters: There are no curly braces in CoffeeScript.
No parentheses: Functions that take arguments do not require parentheses.

How CoffeeScript compiler is helpful in CoffeeScript?

CoffeeScript compiler ensures that within the lexical scope, all your variables are properly declared, and you never need to write “var” yourself

What is the use of Existential Operators in CoffeeScript?

Existential Operators in CoffeeScript can be used for

To check the existence of a variable.
For conditional assignment.
For function chaining.
Infosys CoffeeScript Recently Asked Interview Questions Answer

Explain what is the difference between copying an object through assignment and clone-function ?

The difference between copying an object through assignment and clone function is that how they handle references. The assignment only copies the object’s references while clone-function creates a complete new object.

In CoffeeScript how clone-function is useful ?

Clone function is useful in creating a complete new object in Coffee Script by

Copying all attributes from the source object to the new object
Repeating the steps of copying attributes from the source object for all sub-objects by calling the clone-function
Creating a new object as the source object

Explain what is the use of CoffeeScript’s chained comparison syntax?

CoffeeScript’s chained comparison syntax is used to know whether any given variable falls inside a given range and also it enables to chain the two comparisons together in a form that matches closely.

Is There Any Way To Not Return Something Using CoffeeScript?

It Seems Like CoffeeScript Automatically Returns The Last Item In A Scope. Can I Avoid This Functionality?

Where Is Body In A Nodejs Http.Get Response?

I'm Reading The Docs At Http://Nodejs.Org/Docs/V0.4.0/Api/Http.Html#Http.Request, But For Some Reason, I Can't Seem To To Actually Find The Body/Data Attribute On The Returned, Finished Response Object.

Coffee> Res = Http.Get({Host:'Www.Somesite.Com',Path:'/'})

Coffee> Res.Finished
True

Coffee> Res._hasBody
True
It's Finished (Http.Get Does That For You), So It Should Have Some Kind Of Content. But There's No Body, No Data, And I Can't Read From It. Where Is The Body Hiding?

Examples Of CoffeeScript In NodeJS?

As A Pet Project, I Am Trying To Get Familiar With NodeJS And CoffeeScript, And Am Finding It Hard To Get The Ball Rolling.

I've Found Plenty Of Examples Of Single-File Super-Simple Apps Like In CoffeeScript's Examples Folder, However, None Of Those Really Show What A Full Application Would Look Like. I've Also Scrounged Google To No Avail.

Subscribe to get more Posts :