Programming Tasks / Job Interview

I was applying for a front-end job recently and so I want to share some programming tasks, I was given in job interviews.

I got offers from all those companies and finally I decided to go with company 2, my decision was based on salary and distance to my home. Our stack is C++ for the backend and React (native) for frontend. Well I need to learn a lot of new tools and languages, like Python, Typescript, Jenkins, SVN, Docker :wink:

My words of advise: Trust in yourself and never give up. HTML and JS is just a beginning. Being a developer doesn’t mean to know everything, but how to solve a problem.

If you like to post answer on these tasks, please do so, I’ll be happy to comment!

Thank you FCC!

1) The first one was in form of a word problem: Your company wants their staff to input all their fuel bills into a form, containing fuel price per liter, fuel type (eg. Diesel, Unleaded, Premium), total quantity. The management wants to have a report on monthly fuel consumption, listing the average price per liter for each fuel type and the total quantity of fuel for each month. If you close the browser, all previous data should be saved for later use.

Notes: Time to solve 60min. Show your skills in CSS and JS.


2) The second one was a printout of source excerpt:

Given the following code, what will be the output? What is the difference between $("#xy").html and $("#xy").text?

    <div id="error" style="display: none"></div>
    <div id="div1">Output: </div>
    <script src="jquery.js"></script>
    <script type="text/javascript">
            method: "get",
            url: "data3.json",
            dataType: "json",
            error: function (xhr, textStatus, errorThrown) {
            success: function (data) {

<!-------------- / data3.json / -------------------
    "Error" : {
        "Message"    :  "Error xxx",
        "ErrorCode"  :  "123"
    "Result" : [
                "Name"  : "Ada Lovelace",
                "Age"   : 37
                "Name"  : "Douglas Adams",
                "Age"   : 42
                "Name"  : "John Coltrane",
                "Age"   : 23



3) Write a Call-to-Action in CSS changing in 1s between “special offer until xxx” and “get it now!”

1 Like