Interview Questions – ES6 Questions


  1. What is traceur?
    • ES6 -> ES5
    • Traceur is a JavaScript.next-to-JavaScript-of-today compiler that allows you to use features from the future today. Traceur supports ES6 as well as some experimental ES.next features.Traceur’s goal is to inform the design of new JavaScript features which are only valuable if they allow you to write better code. Traceur allows you to try out new and proposed language features today, helping you say what you mean in your code while informing the standards process.JavaScript’s evolution needs your input. Try out the new language features. Tell us how they work for you and what’s still causing you to use more boilerplate and “design patterns” than you prefer

     

  2. What are the required node_modules to makes traceur working properly
    • $ npm install traceur
      $ npm install traceur-runtime
  3. Why do you need traceur-runtime?
  4. What is the node command to compile ES6 to ES5?
Advertisements

Semantic Snips – Update


I am having some spare time. So I am taking the liberty to compile Semantic Snippets.

I’m using few handpicked resources to ensure everything is consistent. So all the code will be mash up of

At this stage I do not intend provide comprehensive guide to how html5 should be used as above resources are more than enough. Just compilation of snippets inline with best practice for different use cases with references to additional reading materials.

Some of this issues may be subjected to debate. I certainly welcome that

You can view the progress here:

https://github.com/Shavindra/SemanticSnips/

XAMPP Troubleshooting Apache won’t start


Configuring XAMPP for use in Windows

Issue #1 Apache server would not start.

Check for php.ini in the apache location below. For me it was missing php.ini file from drive:\xampp\apache\bin

Fix: #1 copy php.ini file from drive:\xampp\php and paste it in to the -> drive:\xampp\apache\bin

Issue #2 Localhost conguration of the XAMPP/Apache.

I did a port check it showed default port 80 was used by system (i.e. have IIS running) so http://localhost would not load the default xamp page instead it load the site I have in inetpub XAMPP Portc check

I use Tomcat (HTTP) port: 8080. In the above screen status shows it’s been used by a program. I am running XAMPP Apache hence its NOT free. if it’s not free and another program using that program shut it down (Skype is annoyance and often it’s skype).

If you have IIS running as well then you have to either

  1. Uninstall IIS
  2. Shut down IIS or
  3. Configure APACHE to use another port if you want to keep IIS running.

Fix1: Uninstall IIS

Programs > Windows features Turn on / Off > untick off Internet Information Systems >save

Fix2: Shutdown IIS

Right click and run cmd (windows command line) as an administrator and use the following commands

iisrest /stop

windows may restart IIS each time you turn n computer so you may have to run this command.

please make note of the following commands to restart IIS
iisrset /restart
iisreset /start

Fix3: Configure APACHE to use another port if you want IIS running at the same time

Configure the httpd.conf file located in the location below installation location drive: \xampp\apache\conf Locate following in the file #Listen 0.0.0.0:80 #Listen [::]:80 Listen 80 and ServerName localhost:80 change these to #Listen 0.0.0.0:8080 #Listen [::]:8080 Listen 8080 and ServerName localhost:8080 and save to get it all working make sure your URLs are as below.

Update: Video tutorial

I found this video Youtube (credits: GSNTube5)

I see alot of views on this page. I hope this is working for you. Please comment whether this worked for you or not. It would help others.